Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-08-2006, 01:15 PM   #1
asprinwizard
Registered User
 
Join Date: May 2006
Posts: 27
Default unloading multiple movie clips

Hi there,

Is there a way to unload multiple movie clips without having to specifically reference each one? I have a load of parent movie clips which all have child movie clips attached. I want to unload all these child movie clips when I press a reset button. Is there an easy way to do this.

I don't want to have to use specific paths as the name of the child will vary each time the movie is played. So:

this.parentclip_mc.child1_mc.unloadMovie();

is no good because another time the path might need to be:

this.parentclip_mc.child2_mc.unloadMovie();

I basically need a way to unload all movie clips attached to 'parentclip_mc'. Can anyone help?
asprinwizard is offline   Reply With Quote
Old 06-08-2006, 01:28 PM   #2
Zath
Registered User
 
Zath's Avatar
 
Join Date: Apr 2005
Posts: 200
Default

this.parentclip_mc.child1_mc.unloadMovie();

Now, this is untested, but I have done something similar.

You may want to try something like this....
ActionScript Code:
//where 15 = the number of clips to unload for (var i:Number = 1; i<=15; i++) {     this.parentclip_mc["child" + i + "_mc"].unloadMovie();                    }

Like I said, untested but should be close if it doesn't work.
Zath is offline   Reply With Quote
Old 06-08-2006, 02:21 PM   #3
asprinwizard
Registered User
 
Join Date: May 2006
Posts: 27
Default

Thanks. Will give it a try and let you know.
asprinwizard is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applying events to multiple movie clips asprinwizard ActionScript 2.0 2 05-23-2006 10:59 AM
Creating and accessing multiple soundtracks without repeating movie clips ballinasloe ActionScript 1.0 (and below) 3 04-20-2006 07:02 PM
loading multiple movie clips michelle-b ActionScript 2.0 7 02-23-2006 07:03 PM
loading/ unloading multiple movie clips [email protected] ActionScript 2.0 0 09-08-2005 06:57 PM
moving multiple movie clips with button mobzilla Simple Stuff (Newbies) 4 07-24-2004 05:56 AM


All times are GMT. The time now is 01:25 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.