loading a sound file from the library to play it in one frame
I am new to actionscript. I have a flash file with several frames. In each frame I need to play a sound file.
I've added all the sounds to the library and done all the necessary steps to export for actionscript.
Here's my code to play the sound in one frame.
var sound1:Sound = new Cal10101();
sound1.play();
This works great to play the sound. I am using buttons to move to the next frame. When I click the button to move to the next frame, I need the sound from frame 1 to stop and a new sound which would be Cal10102 to start playing.
How do I stop the sound from frame 1 from playing when I go to the next frame?
Thanks,
Steve