Hello there.
Here is the code to make your mc. move out of frame (right) and come back in on the left. I used the ship fla. These x numbers work for me- the ship leaves the frame, there is a little pause and then it enters again on the left. Your numbers may be different depending on where the registration point is on your mc. You might also play with the 'speed' it travels (below it moves 2 pixels every frame)
Ahoy!
L
addEventListener(Event.ENTER_FRAME, shipMove);
function shipMove(e:Event):void
{
if (newboat_mc.x < 700)
{
newboat_mc.x += 2;
}
else
{
newboat_mc.x = -150;
}
}
Thursday, January 21, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment