Guest User

Untitled

a guest
Jun 16th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import flash.events.Event;
  2.  
  3. var nameObejct:String;
  4. var velocity:Number;
  5.  
  6. var startPos:Number = Background.x;
  7.  
  8. stage.addEventListener(Event.ENTER_FRAME, moveBackground);
  9. function moveBackground(e:Event):void {
  10.     velocity = 10;
  11.    
  12.     Background.x -= velocity;
  13.     if(Background.x <= 100) {
  14.         Background.x = startPos;
  15.     }
  16. }
Add Comment
Please, Sign In to add comment