I'm new here and somewhat new to actionscript programming so I apologize for any mistakes. I'm using Adobe Flash CS6.
I'm working on a AS2 project and trying to dynamically load an external .SWF file and an accompanying .MP3 file in my main project .FLA.
What I have:
3 frames. On the 1st frame I have a simple button that advances to the next frame and a "stop();" code. On the 3rd frame I have just a simple drawing to know when I arrive at it and a "stop();" code.
...And on the 2nd frame I have a container (so, just a simple movie clip) with this code:
stop();
createEmptyMovieClip("intro_mc", 20);
intro_mc._x = 0;
intro_mc._y = 0;
loadMovie("TRANSICAO_LOGO.swf",intro_mc);
audioClip = new Sound();
audioClip.loadSound("TRANSICAO_LOGO.mp3",true);
onEnterFrame = function(){
if(intro_mc.getBytesLoaded()==intro_mc.getBytesTotal() && intro_mc.getBytesTotal()>0 && intro_mc._currentframe==intro_mc._totalframes){
delete onEnterFrame;
nextFrame();
}
}
...So, right now I can click on the button on the 1st frame and it will play me the SWF file alongside the MP3 file. The problem is, everytime that I test it, the SWF file (not the MP3) keeps looping. Only one of time it actually went to the 3rd frame.
I really don't understand what is wrong with this. I've been looking online and trying to figure out what is the problem. Does anyone know what might be causing this?
Thank you for the help!