Ok i'm using AS2 for this
I made a master.fla where i want to load all the other swf files into it.
Now i have montage.swf, mainmenu.swf, help.swf, exit.swf and credit.swf
all the swf has it own sound which i loaded into the master file. In the mainmenu.swf i have 5 buttons that links to the other swf files. For example
Mainmenu have help button and credit page button when click should load the help.swf and credit.swf. and shopul;d have a back button to main menu.
so in master flie frame one i put the following coding :
var montageSound:Sound = new Sound();
var menuSound:Sound = new Sound();
montageSound.loadSound("Montage sound.mp3", false);
menuSound.loadSound("Main menu sound.mp3", false);
- var montageSound:Sound = new Sound();
- var menuSound:Sound = new Sound();
- montageSound.loadSound("Montage sound.mp3", false);
- menuSound.loadSound("Main menu sound.mp3", false);
to help with the sound for the other swf files
inthe second frame (for the montage) i put this code:
stop();
_root. menuSound.stop();
_root. montageSound.start(0,999);
var myLV:MovieClipLoader = new MovieClipLoader();
myLV.loadClip("Montageonly.swf", 2);
- stop();
- _root. menuSound.stop();
- _root. montageSound.start(0,999);
- var myLV:MovieClipLoader = new MovieClipLoader();
- myLV.loadClip("Montageonly.swf", 2);
inthe second frame (for the mainmenu) i put this code:
stop();
_root. montageSound.stop();
_root. menuSound.start(0,999);
myLV.loadClip("mainmenu.swf", 3);
- stop();
- _root. montageSound.stop();
- _root. menuSound.start(0,999);
- myLV.loadClip("mainmenu.swf", 3);
and so on codes for other similar to the mainmenu code
Now my problem is that it works fine but whenever i try to click the back button (help page) to go back to mainmenu . It doesn't display the mainmenu page. although i think it loads behind the help page coz the song for mainmenu starts.and also the buttons from the other pages also works although i'm in a different page.
back button code is
back.onPress = function() {
this.play();
_level0.gotoAndPlay(3);
unloadMovie(_level3);
};
- back.onPress = function() {
- this.play();
- _level0.gotoAndPlay(3);
- unloadMovie(_level3);
- };
I heard that you need to remove any current displayed to load the other swf !!!
please help i'm really confused