2 Replies Latest reply on Feb 2, 2010 2:01 AM by salesleadmaximizer

    Controlling audio in Flash CS3


      I've a number of audio files and six menu items in my presentation.  Can anyone respond with instruction on how to stop the currently running audio when a new menu item is clicked (launching a new audio file)???  Really can't get to the control method anywhere!

        • 1. Re: Controlling audio in Flash CS3
          Harry Kunz Level 4

          Use stopAllSounds(); or you can use cSound.stop() if you have a sound object instantiated with name cSound. Then you can load another sound from your library by attaching its linkage name. Linkage names can be given to sounds by right clicking the sound in the library and select Properties and click the check box "Export for ActionScript" then pick an ID name (i.e MyIdSound).


          var cSound:Sound = new Sound();






          If you want to load an external sound use this script



          import mx.utils.Delegate;

          var cExtSound:Sound = new Sound();

          cExtSound.loadSound("ExternSound.mp3", false); //Only mp3 is supported


          cExtSound.onLoad = Delegate.create(this, onExternSoundLoad);


          function onExternSoundLoad():Void





          Hope this helps

          • 2. Re: Controlling audio in Flash CS3
            salesleadmaximizer Level 1



            That is indeed very helpful and many thanks. I'll give it a go later today

            and will let you know!


            Robert Walker