3 Replies Latest reply on Oct 15, 2006 9:20 AM by kglad

    Play interval of sound from larger MP3?

    AB2201

      Hi,
      I want to be able to play small sub-segments of a larger sound when some buttons are pressed. The overall MP3 sound file might be 3 seconds long, but I want to be able to play arbitrary parts of that (say starting at 0.58 seconds with a duration of 0.20 seconds). Is this possible? I read somewhere that Flash "intervals" (timers?) are not super-precise. I'd like to reliably specify the start time and duration down to the 0.010 second level if possible.
      Thanks
        • 1. Re: Play interval of sound from larger MP3?
          kglad Adobe Community Professional & MVP
          check the sound class for all the methods (including start() ) that you can use. but you're not able to control sounds to within .01 seconds. on the other hand, doubt anyone could determine whether a sound played for .55 or .58 seconds.
          • 2. Play interval of sound from larger MP3?
            AB2201 Level 1
            Hi kglad,
            It looks like the start method of the Sound class does let you specify an arbitrary starting point, but NOT an arbitrary stopping point. So it lets you begin playing the sound somewhere other than at its start, but you have to apparently let it always play through to the absolute end of the sound. Are there any other methods I should look at?
            What about using the Media component(s) with cue points? What if I set a cue point for the arbitrary end time and then silenced the sound when that cue point fired?
            Thanks, AB2201
            • 3. Re: Play interval of sound from larger MP3?
              kglad Adobe Community Professional & MVP
              you can stop any sound object using the stop() method. you must initiate a loop/timer that will trigger a sound.stop() statement at the required time.