-
[F8] Easy unload mc
What is the easiest way so that when I press a button if first unloads all mc loaded, then loads the mc that the button calls for.
something like an unloadmc (all)
-
Senior Member
Originally Posted by Dijhili
What is the easiest way so that when I press a button if first unloads all mc loaded, then loads the mc that the button calls for.
something like an unloadmc (all)
For me, the easiest way would be to push all of the loaded clips into an array, then run the array to unload the clips. Something like:
Code:
var loadClips:Array = new Array();
function unloadAll():Void {
while(loadClips.length > 0){
var c:Object = loadClips.pop();
c.unloadMovie();
}
//load next clip(s);
}
Hope this helps.
d.
-
debugger reported errors all over the place.
-
Senior Member
Are you publishing to AS2, or AS1, and are you using this within a Flash movie or in an externa class?
d.
-
-
-
Senior Member
Not sure why you are getting AS errors then. When I test the script as I wrote it, it's fine. What does the output say? Or better yet, do you have a larger part of your code to see it in context?
d.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|