computergeek67
|
Simple MovementFirst make an object. To make it simple, make a circle. Press "F8" to turn it into a Movie Clip (MC). Press "F9" to open the actions panel. Then add the actions:
| Code: |
onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
this._y -=3 }
if(Key.isDown(Key.DOWN)){
this._y +=3 }
if(Key.isDown(Key.LEFT)){
this._x -=3 }
if(Key.isDown(Key.RIGHT)){
this._x +=3
}
} |
The code basically says that the speed that the MC will travel at is three and it will travel in any basic direction.
|