Flash CS6 Tutorial: Easy Actionscript

May 9, 2013 12:00 am

Flash cs6 tutorial learn how make an easy actionscript so you can move a object with your arrow keys.
ActionScript code:
Airplane.onEnterFrame=function(){
if(Key.isDown(Key.RIGHT)){
Airplane._x+=5;
Airplane._rotation=90;
}
if(Key.isDown(Key.LEFT)){
Airplane._x+=-5;
Airplane._rotation=-90;
}
if(Key.isDown(Key.UP)){
Airplane._y-=5;
Airplane._rotation=0;
}
if(Key.isDown(Key.DOWN)){
Airplane._y+=5;
Airplane._rotation=180;
}

}