iSteven
asked on
Cleanup MovieClips on Scene Change in ActionScript 2
for(i=0;i<itemLength;i++)
{
duplicateMovieClip("tvmenu item", "tvmenuitem"+i, i);
...
However when I change the scene using: gotoAndPlay('main',1);
The main scene is overlayed with all the MovieClips I had in the previous scene.
How can I automagically clean them up?
{
duplicateMovieClip("tvmenu
...
However when I change the scene using: gotoAndPlay('main',1);
The main scene is overlayed with all the MovieClips I had in the previous scene.
How can I automagically clean them up?
can you upload your file so we can have a look?
You might want to create a lable and use it rather than referencing it with the scene name...
For example, go to the frame 1 of the scene 'main', and put a frame lable called 'start' and use gotoAndPlay("start"); instead of gotoAndPlay('main',1);
CyanBlue
For example, go to the frame 1 of the scene 'main', and put a frame lable called 'start' and use gotoAndPlay("start"); instead of gotoAndPlay('main',1);
CyanBlue
Make all the movie clips children of a "master" clip that only appears on Scene 1. When you switch to Scene 2, that "master" movie clip will no longer be there, so all its children (your duplicate movie clips) will also be gone.
ASKER
How do I make it appear only in scene 1? I'm not sure how to make them children.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.