PDA

View Full Version : Problem with loadMovie reloading over and over



diggs
June 12th, 2009, 03:47 PM
I created an external .swf that plays an mp3 and functions as a mute/unmute sound toggle. On its own it plays/toggles fine, but when I use loadMovie to load it into my main .swf it just starts reloading over and over until the song has started one after the next and it becomes a jumbled mess of overlapping songs.

I'm going to keep searching through the forums, but does anyone have any clues? I use loadMovie for an animated gif .swf in the same main .swf and that doesn't give me any issues so I'm curious to know what my oversight is.

tic
June 12th, 2009, 06:38 PM
Do you have your loadMovie in an enterFrame event perhaps?

It might help to post your code.. So we can see where the problem is.

diggs
June 17th, 2009, 02:43 PM
Just wanted to follow up that I abandoned this effort and put everything into a new AS3 project and used the Loader class instead of loadMovie to import my swf. That did the trick for me.

So what gave me problems as this:

loadMovie("sound_toggle.swf",toggle_place);

became this and worked great for me:

var request:URLRequest = new URLRequest("sound_toggle.swf");
var soundLoader:Loader = new Loader();
soundLoader.load(request);
soundLoader.x=587.9;
soundLoader.y=522.5
addChild(soundLoader);