I have a main swf that loads 6 movies. And I know how to stack movies in levels and how to target different levels from wherever the user may be. But the trouble is the level/movie on top has to visually overlap the level/movie underneath. And this has to happen dynamically because, say my main movie points to A, B, C, D, E, and F. If I go to B from F, I need to see part of F until I see B. So if I tell Main to open ABCDEF on 1 that works fine. But I can’t simply tell A to open B on level 2 because ABCDEF needs to stack on top of the former ABCDEF. Does that make sense? I’ve been living this for five days and it hardly makes sense to me.
Take my word for it, ABCDE & F need to overlap in a way where I can’t just set their levels as one higher than the next.
Well, I’ve nearly had it a few times using a variety of solutions. And I think I have the right solution now, I just don’t know how to say something in actionscript speak. This is what I’ve got going on:
on (release) {
// do I have to unload what is alread in level 1??
myCurrent Level = (_level);
myCurrentLevel.swapDepths(-1);
//whether this is level 1 or level 2
// push it down one level
// and load the new swf over top
loadMovieNum(“contact.swf”, 2);
}
In my mind this works. It checks to see what my current level is (because it could be level 1 or level 2) and uses Swap Depth to push the current movie down one level and will always put the new swf on the level above it. The thing is, I don’t know how to ask Flash to trace what the current level is. I can’t find this information anywhere.
Anybody know?
Besides that, anybody know whether this is the wrong idea or not?
I don’t seem to be able to access the turorials today although I could yesterday where I did read all the tutorials about SwapDepths that I could find. (Maybe there are more that I didn’t find.)
Meanwhile, could you help me out with this:
Is there some actionscript that will trace what level I’m currently on?
Because any particular swf could have been loaded from various places, I can never be sure what level I’m currently on.
So if I had the code that would trace my current level it would help me get going, I think.
Something along the lines of below only it’s fictionscript (made up actionscript) and doesn’t work.
Ok. I need to avoid being whiny or ungrateful here. But believe me I tried solving this problem for days and days and I’m pulling out my hair here.
I’ve looked at both of these swapDepth tutorials before but can’t translate what’s happening there to what I’m doing.
I have a Main movie that loads one of six sub movies on top. Main on 0 level, sub on level 1. And the overlapping part works fine. But the trouble is the user can go to any of the 6 sub movies. And then the user will go to another of the 6 sub movies. It’s this event that I can’t solve. I need the second sub movie to appear on top of (and overlap) the former sub movie.
I believe swapDepths can control levels and not just objects within the same movie (read: swf). But I can’t work this out.
Now of course I could script all 6 sub movies to load on level 2 which means Main loads one of the 6 on top on level 1. And one of the 6 loads another of the 6 on level 2 (read: on top of level 2) but then it doesn’t work anymore. I understand why but I can’t come up with a working solution.
Because the choice of any of the 6 sub movies is random and user-generated I can’t just stack my 6 sub movies sequentially.
So what I thought I would do is load my 6 on level 1 from main and load my other 5 on level 2 from the 6 sub movies and script the movies to swap to level 1 before the user can load the next of the 6 sub movies on level 2.
So on the buttons, swap the current level from 2 to 1
loadMovieNum (“this.swf”, 2)
And now that I’ve talked it through all I need to figure out is how to script: swap current level (level 2) to level 1.