Now lets get down to business .
Asumming you have your main movie and you have your menu buttons. you have to attach this script in to the button
CODE
on(press){
unloadMovieNum(10);
}
on(release){
loadMovieNum("sectionname.swf",10);
}
unloadMovieNum(10);
}
on(release){
loadMovieNum("sectionname.swf",10);
}
Now let me explain you the code.
The on statement its pretty simple it means the state of the button,on(press) means that when you press the button in the movie, the code between the cuirls its gonna be executed, the same with the on(release) the code will be executed when you realesed the button.
First lets talk about the "loadMovieNum" code, this code load the movie ("whatever.swf") into the main movie.
we need to tell the code 2 things first the name of the movie we are about to load :
loadMovieNum("whatever.swf",);
secondly we need to tell the code in wich level we want the movie to be loaded:
loadMovieNum("whatever.swf",10); // This means that the movie called whatever.swf will be loaded in level 10.
Now let me explain to you the level thing:
the main movie is level 0 by default, you can think of level as leyers, something in level 10 will be on top of level 0, for a example if your movie is 300x300 size (level0), and then you load a movie with a 300X300 filled square on level 5 you wont see a thing cause level 5 is on top on level 0 and since you have a square filling the hole movie it wont let us see anything that is the lower levels. (you can use whatever level you want i choose 10 for no reason) also you can load things on different levels an the same time, for example i can load a logo animation on level 50 and then load other things in the lower level in that case the logo will be always on top, no matter what.
Now let me explain the unloadMovieNum code:
its pretty simple it just unload whatever movie is loaded into the level that we specify
for this code we only need to tell one thing and that is the level where the movie we want to unload is.
for example if i want to unload the movie in level 10 i will say
unloadMovieNum(10); and thats it.
Now let take a look again at the code
CODE
on(press){
unloadMovieNum(10);
}
on(release){
loadMovieNum("sectionname.swf",10);
}
unloadMovieNum(10);
}
on(release){
loadMovieNum("sectionname.swf",10);
}
This tell me that when i hit the button first it will unload everything that is on level 10 and then load the movie called sectioname.swf into level 10. Remeber that you can change the movie name and the level number.
Why do we need to unload everything in level 10.
For example if we have the section 1 loaded in level 10 and the we load section 2 into the same level without unloading, both sections will be seen at the same time, causing a huge mess, so first you have to unload things.
i hope you like the tutorial, this load thing is one of the huge things in order to build full flash sites.

