Button to play one sound then another

Hi there,

I have a number of buttons which, when clicked, each play a soundbite. There are actually two soundbites I need to play for each button, so I need to tell the button to play one sound then play a second. (I’m using actionscript 3.)

An example of a current button is as follows:


school_saButton.addEventListener(MouseEvent.CLICK, school_saHandler);

function school_saHandler (e:MouseEvent):void  {
var snd:Sound= new school_SA();
snd.play();
}

My question is: Will I be able to add code meaning “and then play this sound”, or would this require more complicated code to check when the first sound file has finished etc before playing the second?

If the latter is true, would it be better to just combine the sound files into a single one for each button? (Once I know the best approach, I’m sure I’ll be able to find a tutorial to help me get the code right.)

Thanks for your advice!