There are several ways to manipulate audio with ActionScript 2. See the following for an overview of interacting with sound in code:AS2 Sound Class
Normally, all that's required is the usual: stopAllSounds();
We do this normally For courses that have background audio, however, this may not be ideal. In those cases, it's possible to use the following method:
var questionAudio:Sound = new Sound(this); questionAudio.stop();
The trickery here is that in creating a sound using new Sound();
, we pass in this
, telling the code that it should refer to the MovieClip that contained the code. You can also pass in a separate MovieClip to control that MovieClip's audio instead.