Archive for VTW 
 


       VTW Forum Index -> Actionscript
computergeek67

Simple Movement

First 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.

       VTW Forum Index -> Actionscript
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum