I´m loading some MP3 from an external URL.
I need to wait to completely load the mp3 and then start to play it.
Do you know how can I check when mp3 loads completely?
This is my code:
var s:Sound = new Sound(new URLRequest("url.com/file.mp3"));
var channel:SoundChannel = new SoundChannel();
channel = s.play();
Best, Flavio
You can listener for the complete event of the sound object before calling play. Also, since
Sound.play()returns a SoundChannel object you don’t need to instantiate one, just define a variable to hold it’s reference outside the scope of the complete handler.