Flashloadmovie fustration (ac script)

hi is there a way that flash can detect the last movie level loaded
ie level 1 and when flash loads the next movie it stacks it on level 2 then level 3 and so on…

kind of an automatic level detection ???

i dont want flash to replace the movie ie load it on level 0 …coz there are some varibles constantly checking things

please help…
someone…!!!

Sure, add a variable to the timeline.

Lets call this variable levelNum.

So have this on a frame on the timeline…

levelNum = 0;

Now assuming you load your movies from button presses you can simply do this…

[AS]on (release){
levelNum++;
loadMovieNum(“file.swf”, levelNum);
}[/AS]

levelNum++ is the same as saying levelNum = levelNum+1, so basically it increments the variable by 1. Then the new number will be placed in the loadMovieNum code where levelNum is.

THANK YOU SO MUCH MATE I HOPE IT WORKS

GENIUS

you can try using an level variable, and when you load an movie, you rease this variable, on unload, you lower it…


// 1st frame of movie
_global.loadlevel = 2


// how to load an movie
loadMovie("file.swf",_global.loadlevel)
_global.loadlevel++

each time you load an movie, the loadlevel will rease, and the movie will load on an new level. this can be used anywere in your movie


// how to remove an movie
unloadMovie(level)
if(level==_global.loadlevel){
_global.loadlevel--
}

this will remove the indicated movie, and when the indicated movie is on top of all (the _global.loadlevel var) it will lower its value, so that you get less get gaps between your levels

hope you understand how it works, let me know :slight_smile:

crap, my answer is better !! :stuck_out_tongue: hehe

I think I beat you to it RvGate… sorry :frowning:

LOL, we posted at the same time.

hehe :smiley:

ps: come msn :wink:

its 4:45am, Im off to bed dude…lol.

LoL !!! :smiley: its 10.44 here, i just got up :stuck_out_tongue:

LOL, lucky you :stuck_out_tongue: