Question

I have a flash CS project. I have one stage and some frames. How can I start all project from beginning using AS3? Or start all stage's content from beginning? Is any possibility to do it?

Was it helpful?

Solution

MovieClip has a function gotoAndPlay(frameNumber). So, you need a movieclip which is added directly to stage and that holds all other movieclips.

Note, that frames counts from 1.

update: That's what I would do: Make a wrapper movieclip, export it for actionscript.

In my main (document) class I would make a variable i.e. world:MovieClip to hold the wrapper. Then I could dynamically create and delete this movieclip, and then create it again.

As I said, if you are being careful with references, the garbage collector will keep the memory clean. Objects that do not have references, eventListeners and that are not in the display list, will be deleted on the next GC iteration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top