1 Reply Latest reply on Feb 10, 2008 5:49 PM by FlexConvert

    Play a series of sounds w/o overlap?

    FlexConvert
      hey guys,

      I'm doing my first Flex/Air application. It's essentially a for-fun project to help me learn the tools. I'm a musician, and I'm building an ear training application.

      I have generated a bunch of .mp3 files, and I'm embedding them like this:

      [Bindable]
      [Embed('../assets/sounds/sinewaves/3ANatural.mp3')]
      private var A3Natural:Class;

      Then:

      private var A3N:SoundAsset = new A3Natural() as SoundAsset;

      Then, eventually, A3N.play();

      They're all one-second clips, and I need to play two of them in a row without overlap. Any ideas?

      /w
        • 1. Re: Play a series of sounds w/o overlap?
          FlexConvert Level 1
          Ok, I kind of figured it out. I'm using the timer class to trigger the second sound one second after the first sound.

          Now, this only works because I know how long the clips are. It's a little inflexible down the road. I may want to play short sound clips of music for things like musical dictation. Timer's going to be a tougher implementation than "onSoundClipEnd()" would be.

          Any other thoughts?

          /w