0 Replies Latest reply on Jun 6, 2007 10:24 AM by abrtlt

    when does Sound.onLoad() trigger for progressive download?

    abrtlt
      I'm playing an mp3 file progressively downloaded:

      var sndTrack:Sound = new Sound();
      sndTrack.loadSound(“my.mp3”, true);

      when does snd.Track.onLoad trigger? As soon as audio reproduction starts or when the whole mp3 has been fully loaded into the browser's cache?
      As I haven't uploaded the swf to a remote web server, I can't tell the difference as the loading is instantaneous on a workstation.
      I'd like to trigger some animation synchronized (if at all possible) with the mp3 being played but position() and getBytesLoaded() return 0 unless called from within the onLoad handler. To investigate, I've tried a time waster loop after loadSound, but even after that getBytesLoaded() returns 0, I guess it's a different thread. If audio plays before onLoad triggers I need some other audio starting event to synchronize with.
      Thanks!

      Andrew