Problem loading external swf files

  • viki9
  • Novice
  • Novice
  • viki9
  • Posts: 16

Post 3+ Months Ago

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 :
Code: [ Select ]
var montageSound:Sound = new Sound();
var menuSound:Sound = new Sound();
    montageSound.loadSound("Montage sound.mp3", false);
    menuSound.loadSound("Main menu sound.mp3", false);
  1. var montageSound:Sound = new Sound();
  2. var menuSound:Sound = new Sound();
  3.     montageSound.loadSound("Montage sound.mp3", false);
  4.     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:

Code: [ Select ]
stop();
_root. menuSound.stop();
_root. montageSound.start(0,999);

var myLV:MovieClipLoader = new MovieClipLoader();
myLV.loadClip("Montageonly.swf", 2);
  1. stop();
  2. _root. menuSound.stop();
  3. _root. montageSound.start(0,999);
  4. var myLV:MovieClipLoader = new MovieClipLoader();
  5. myLV.loadClip("Montageonly.swf", 2);


inthe second frame (for the mainmenu) i put this code:
Code: [ Select ]
stop();
_root. montageSound.stop();
_root. menuSound.start(0,999);

myLV.loadClip("mainmenu.swf", 3);
  1. stop();
  2. _root. montageSound.stop();
  3. _root. menuSound.start(0,999);
  4. 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
Code: [ Select ]
back.onPress = function() {
    this.play();
    _level0.gotoAndPlay(3);
    unloadMovie(_level3);
};
  1. back.onPress = function() {
  2.     this.play();
  3.     _level0.gotoAndPlay(3);
  4.     unloadMovie(_level3);
  5. };

I heard that you need to remove any current displayed to load the other swf !!!

please help i'm really confused
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 14 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.