Groups | Blog | Home
all groups > flash actionscript > february 2006 >

flash actionscript : Unload all swf's in levels, except level 0?


twistedpancreas
2/28/2006 11:41:06 PM
I have a main swf opening other swf's in other levels.

In one of those other 'top' levels is a button which should be able to close
all levels except level 0.

i know there is this code:

on (release) {
unloadMovie(0);
}

problem is this unloads level 0 as well. Basically i just want to unload all
levels (without having to write each one out individually) quickly.

Thanks in advance
blemmo
3/1/2006 12:31:42 AM
This is a somewhat dirty solution, but should work:
on(release){
for(i=1;i<=10;i++){
unloadMovieNum(i);
}
}

You may input a number that's very likely the highest level you'll use. I
think there's no way to get the occupied levels dynamically.

cheers,
blemmo
twistedpancreas
3/1/2006 1:17:01 AM
AddThis Social Bookmark Button