Posted By

xirclebox on 08/25/07


Tagged

actionscript


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

arala22


simple animation code


 / Published in: ActionScript
 

Moves the MovieClip along the x axis. Change the _x to _y to move the MovieClip along the y axis.

  1. onClipEvent (enterFrame) {
  2. var speed:Number = 10;//This can be any number you want.
  3. this._x += speed;// moves the MovieClip along the x axis. Change the _x to _y to move the MovieClip along the y axis.
  4. if (_x>=600) {// as long as the registration point for the MovieClip is Greater Than or Equal To 600, the MovieClip will move.
  5. this._x= speed/2;
  6. }
  7. }

Report this snippet  

You need to login to post a comment.