Working with levels

Hi,
I currently have 22 flash files (*.swf).
As i do not want the user to take too long to load my flash file. i have decided to design them into different flash files instead of using scenes.

Currently i have tried loading them into different levels and the particular flash file will only be displayed when a button is clicked. (One button is designed for 1 swf file)

So in another word, my first.swf will have this action in the 1st keyframe … loadMovieNum(“second.swf”,1); and loadMovieNum(“third.swf”,2);
So when second button is clicked, it will call the action _level1.gotoAndPlay(2); and when user click on third button, it will call the action _level2.gotoAndPlay(2); and this works perfectly ok.
But the problem is when user is at the third swf file, and he would like to access back to second swf. When the second button is clicked, although it has the action _level1.gotoAndPlay(2); it does not work at all.
Is it bcos flash is not able to call back a lower level to be displayed again.
In another word, after level2 is displayed, flash is not able to display level1 once again despite the actionscript is there.

If that’s the case, may i know how can i go about in doing to make this works?

Thanks a million!

Try loading and unloading your movies. That might help your problem. :slight_smile:

If you are calling a movie in a lower level another one then that movie will appear but it will be below the current movie and you cannot see it. It works like a stack of plates really, if there is a plate on top you cant see the plate below. Is there a reason to call them in a different levels? You only need to do this if you want to have them visible at once ie a menu system to sit over the current swf you are using. If you simply want to replace the content you are seeing then calling the movie at the same level will replace the existing movie clip shown

*Originally posted by Stephen *
**If you are calling a movie in a lower level another one then that movie will appear but it will be below the current movie and you cannot see it. It works like a stack of plates really, if there is a plate on top you cant see the plate below. Is there a reason to call them in a different levels? You only need to do this if you want to have them visible at once ie a menu system to sit over the current swf you are using. If you simply want to replace the content you are seeing then calling the movie at the same level will replace the existing movie clip shown **

But the problem is … no matter which swf file the user is, he can access back to any other flash files he wans to.
Therefore, i can’t load them into same levels

Stephen is right. Your flash movies will go into like a stack of plates. For that reason, you will then have to use loadmovie and unloadmovie to access every movie you are viewing.

*Originally posted by rvanet *
**Try loading and unloading your movies. That might help your problem. :slight_smile: **

HI rvanet,
Erm … where should i unload and reload my movie again?

hmmm… let’s make it very simple… we’ll only use loadMovie… say for example we have 3 movies.
First create 3 buttons. (gotoAndStop(2), gotoAndStop(3), and gotoAndStop(4) repectively.
Second, put a stop() on the firstFrame.
In this case, by the time you run the movie then the three buttons will appear.

In the 2nd frame put: loadMovieNum(“movie1.swf”,1);
In the 3rd frame put: loadMovieNum(“movie2.swf”,1);
In the 4th frame put: loadMovieNum(“movie3.swf”,1);

That’s it! At least it will give an idea.

Hope it helps! :slight_smile:

Thats exactly what I meant, by using the code above you can go back to any of the previous files you have looked at. Theres no need to load into different levels as you wont be able to see whats below unless the movie dosn’t cover the whole viewable area

*Originally posted by rvanet *
**hmmm… let’s make it very simple… we’ll only use loadMovie… say for example we have 3 movies.
First create 3 buttons. (gotoAndStop(2), gotoAndStop(3), and gotoAndStop(4) repectively.
Second, put a stop() on the firstFrame.
In this case, by the time you run the movie then the three buttons will appear.

In the 2nd frame put: loadMovieNum(“movie1.swf”,1);
In the 3rd frame put: loadMovieNum(“movie2.swf”,1);
In the 4th frame put: loadMovieNum(“movie3.swf”,1);

That’s it! At least it will give an idea.

Hope it helps! :slight_smile: **

Hi, sorry … think i am getting abit lost over here. As i am quite new in flash, therefore i can’t really catch it. Erm … i dun get this … First create 3 buttons. (gotoAndStop(2), gotoAndStop(3), and gotoAndStop(4) repectively. May i know what’s the gotoAndStop(2) action mean?
Kindly enlighten me please … thanx
And do i load all the movies in the 1st flash file?

What I mean is that put the actionscript on the buttons here:
button1:
[AS] on (release) {
gotoAndStop(2);
} [/AS]
button2:
[AS] on (release) {
gotoAndStop(3);
}[/AS]
button3:
[AS]on (release) {
gotoAndStop(4);
}[/AS]

Sorry for the delayed reply. I am thinking now that you have figured it out already.

Cheers!