You want to play a sound or stop one from playing.
Use the start( ) and stop( ) methods of the Sound object that controls the sound.
Sounds added to timelines at authoring time begin playback as soon as the playhead enters the frame containing the sound. In contrast, sounds that are added programmatically (see Recipe 13.2 and Recipe 15.5) do not begin playing until they are started with the Sound.start( ) method:
You can also specify the number of seconds into the audio track at which to begin playback by passing the start( ) method an optional offset parameter. For example, if you pass the start( ) method a value of 6, the audio will begin playing six seconds into the sound clip:
Unless directed otherwise, a sound plays once (until it reaches its end). You can stop a sound prematurely with the stop( ) method:
You can also stop all sounds in a movie using the stopAllSounds( ) global function:
When you stop a sound and then restart it, Flash automatically restarts the sound at the beginning.
To pause and resume sounds, see Recipe 13.7. See Recipe 13.6 for setting in and out points.