To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-15-2004, 03:33 PM   #1
marco_polo7000
Junior Member
 
Join Date: Nov 2003
Posts: 13
does unloadMovie unload mc's that are done loading?

I am loading a number of swf's into empty movie clips. They are quite large. If the user wants to abort this Flash Movie (playing within a browser) I want to clean up by unloading all the movies. Will my unload function (below) kill all movie clips even if they have not completely loaded?

Thanks in advance!

var iPageStart = 0;
for(var i = _root.iPageStart; i < n; i++) {
mc = _root.createEmptyMovieClip("movie" + i, i);
mc._x = 0;
mc._y = 102;
mc.loadMovie("oronite-scrollText-" + i + ".swf");
}
//fired from an exit button
function unloadAll(){
iPageStart = 0;
for(var i = _root.iPageStart; i < n; i++) {
_root["movie"+i].unloadMovie();
}
return true;
}

Last edited by marco_polo7000; 10-15-2004 at 03:43 PM.
marco_polo7000 is offline   Reply With Quote
Old 10-15-2004, 03:46 PM   #2
jbum
Senior Member
 
jbum's Avatar
 
Join Date: Feb 2004
Location: Los Angeles
Posts: 2,920
If you attach all the movies to a single container movie, then you can unload the container movie only, and all the stuff attached to it will unload, regardless of whether it is finished loading. This also simplifies your unload code.


code:

var iPageStart = 0;
cont_mc = _root.createEmptyMovieClip('cont_mc', 1);

for(var i = _root.iPageStart; i < n; i++) {
mc = cont_mc.createEmptyMovieClip("movie" + i, i);
mc._x = 0;
mc._y = 102;
mc.loadMovie("oronite-scrollText-" + i + ".swf");
}


//fired from an exit button
function unloadAll(){
iPageStart = 0;
_root.cont_mc.unloadMovie();
return true;
}


__________________
jbum is offline   Reply With Quote
Old 10-15-2004, 03:56 PM   #3
marco_polo7000
Junior Member
 
Join Date: Nov 2003
Posts: 13
Ah, I'll try that out. Thanks!
marco_polo7000 is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:30 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.