|
|
Why?
I have applied this code to a movie clip:
Code: onClipEvent(enterFrame){ if(Key.isDown(38)){ _root.ball2._y = _root.ball2._y - 5; } if(Key.isDown(40)){ _root.ball2._y = _root.ball2._y + 5; } if(Key.isDown(37)){ _root.ball2.gotoAndStop("left"); _root.ball2._x = _root.ball2._x - 5; } if(Key.isDown(39)){ _root.ball2.gotoAndStop("right"); _root.ball2._x = _root.ball2._x + 5; } if(this._x>=Stage.width) { _root.gotoAndStop("world2");//<= this._x = this._x - 300; //<= } if(this._x<=Stage.width){ _root.gotoAndStop("world0"); this._x = this._x + 300; }
} When the ball goes all the way to the left of the screen, it's supposed to go to and stop at "world0" and if it goes all the way to the right, it's supposed to go to and stop at "world2". However, as soon as the movie clip plays, the ball automatically goes to "world0". WHY?!
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 06-09-2007, 12:49 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
|
|
|