Jump to content
Search Community

mp3Loader - how to play loaded sound more than once?

vuk test
Moderator Tag

Recommended Posts


The easiest way to explain this is to give you an code example with comments that explain problem inside.

Here it is:


screenSound = new MP3Loader("sounds/screen.mp3", {name:"audio", autoPlay:false, repeat:0, estimatedBytes:9500});
rotateSound = new MP3Loader("sounds/rotate-short.mp3", {name:"audio", autoPlay:false, repeat:0, estimatedBytes:9500});

var queue:LoaderMax = new LoaderMax({name:"mainQueue", onComplete:animateBg});
queue.append( screenSound );
queue.append( rotateSound );

queue.load ();

//after a few lines of code in animateB function which is invoked by event handler in LoaderMax I use:
//and this works fine

//then again after few lines of code in some other function which is invoked from animateBg I again try to use
//and nothing, sound won`t play


So, looks like I just can`t play loaded sound more than once... what am I doing wrong?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...