Hi peeps,
been having a mental block with something that I think should be fairly straight forward.
I want a sprite to be added to the stage, then move along the stage, I guess using the ENTER_FRAME listener. Then when it reaches a certain point, for example ball.x = 200; it is to stay there. Also when it reaches that point, another iteration of the ball sprite is added to the stage at another point on the stage, and then do the same thing as the previous on (like move across the screen until it reaches the stop point (like the one before).
This adding of Sprites and then moving, checking if it reaches a point, if so, stop this sprite from moving, then add another sprite in the initial position, would be on a loop until a condition is met, i.e counter = 100;
I can’t seem to get it down on code, (cue people going “man this is easy”!!)
So in short
- add sprite to stage at sprite.x = 100; sprite.y = 150;
- move sprite across stage 10 pixels per frame
- when sprite.x => 500; stop the sprite. counter++;
- add another sprite instance in the original location (sprite.x = 100; sprite.y = 150;)
- repeat steps 3)-4) until counter == 100, then go to 6
- stop
Thanks for your help peeps!
Melacroso
:samus_v2: