0 Replies Latest reply on Jul 29, 2008 5:30 AM by mjc1904

    Stopping sound at certain position

    mjc1904
      Ok, I must be missing something obvious here, but here goes...

      I want to be able to play a sound from one position to another. The first bit is easy because the play() method takes a position. But how about automatically stopping the sound playback at another position?

      Suppose I want to play an mp3 from position 20000 to position 30000...

      Ideally, I want to add an event listener to when the soundchannel hits the 30000 position so that I can then invoke the stop() method. But it looks like this is not possible.

      Another option might be to use the Timer class. But what if the mp3 file has been played back slower than realtime (network issues)...?