-
Refresh a Movie?
Hello everyone,
I was just wondering if there was a way using Actionscript to refresh a movie, meaning start from the beginning completly fresh as if you just opened it for the first time
Yes there is some point as to why I want to know , since for a game Im making , Im having quite the trouble removing movieclips. So when you click 'again' after losing , the old movieclips are still there and therfore pose a big problem
Having a refresh would be nice ;)
Thanks everyone
-
try "unloadMovie(target:MovieClip) : Void" this is if you use the loadMovie function
-
Ok sounds good, but Ill keep that in mind when I use a loadmovie. The reason Im asking this is because there is only ONE movie swf. On the game over scene, when you click the 'again' button, it takes you to the game scene
The problem is, my removemovieclip things dont work properly, and so the movieclips stay
For example, you die on level 2, and click the 'again' button. It will take you back to level 1, but since removing my movieclips do not work ... the level 2 blocks are invisibly there on level 1 .. causing somewhat of a problem
Anyways, thanks for the help :)
-
Have you tried "putting them out of action" so to speak? For instance move them off the stage or something like that.
-
Well I was reverse engineering a very basic engine for a 'breakout' type game. It was basically a few blocks that you can destroy with the ball which bounces around the walls and paddle
I had to modify it to fit my needs, but basically its a tile based game, the blocks are the tiles
Everything is stored in a two demensional array, all the 1's representing where a block will appear. Once the ball hits the block, the movieclip is removed ... that works fine
But for some reason when I myself remove a movieclip after hitting the 'boundary' line which takes you to the gameover screen with the 'again' button, the movieclips or tiles do not dissapear
Its wierd ;)