script de acción para agregar un botón de pausa en unos pocos botones de audio

Actualmente estoy usando el siguiente código para reproducir grabaciones de audio de la biblioteca del proyecto.

import flash.media.Sound;
import flash.media.SoundChannel;
import flash.events.MouseEvent;

var sound1:Sound = new audio1();
var sound2:Sound = new audio2();

var mySoundChannel:SoundChannel = new SoundChannel();

function stopSound():void
{
   //This stops all sound in the sound channel. 
   //If there is nothing playing, nothing happens.
   mySoundChannel.stop();
}

//In this function, we create an argument that allows us to tell the function 
//what sound to we want it to play.
function playSound(soundname:String):void
{
   try
   {
      mySoundChannel = this[soundname].play(0, 0);
   }
   catch(error:ReferenceError)
   {
      trace("playSound: That sound name doesn't exist.");
      return;
   }
 }

//Hook up buttons-->
button1.buttonMode = true;
button1.useHandCursor = true;

button2.buttonMode = true;
button2.useHandCursor = true;

button1.addEventListener(MouseEvent.CLICK, button1click);
button2.addEventListener(MouseEvent.CLICK, button2click);

function button1click(evt:Event):void
{
   stopSound();
   playSound("sound1");
}

function button2click(evt:Event):void
{
   stopSound();
   playSound("sound2");
}

Necesito hacer una pausa en el audio que se está reproduciendo actualmente cuando se hace clic en un botón. ¿Cómo hago esto?

Respuestas a la pregunta(1)

Su respuesta a la pregunta