Is it possible to listen for when a streaming mp3 actually begins to play?
e.g.
var snd:Sound = new Sound();
snd.load(new URLRequest("my.mp3"));
snd.play();
When loading/streaming the mp3 file over wifi or 3G the playback might not begin immediately.
I need to trigger something when the audio actually starts.
Thanks,
Mark
There is a complete event for the Sound object that will fire when the data has loaded successfully. Assuming that the audio starts playing immediately after the loading is complete you can make use of this event.
Another approach would be use to the SoundChannel object returned by Sound.play and keep polling the position attribute of the SoundChannel object. The position attribute has a value greater than 0 then the audio has started.