simple movement


/ Published in: ActionScript
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.