I used stop(); to stop my game. Each "section" takes only 1 frame, so each frame is stopped.
However, I have a sound I want to always play in the background, no matter what. It should always play and always loop, until the game finishes.
Do I have to script it? With what commands?
Look into using the Sound class to load and play the sound file. If you search Google using terms like "AS3 Sound tutorial" you should be able to find something to guide you. If you happen to be using AS2, substitute that in place of AS3 in the search terms.
in the New layer scene. Click Layer frame (must keyframe) to select the following properties (like sound). Then select the sound you want to play (synchronization: best changed to "start")after that you want to turn off the sound, to the button with action: stopAllSounds (); line
Note: stopAllSounds (); All the sound stops.
An older student showed to me how to do it.
I wrote the following in frame1. Note that my sound has linkage to "Sound_Caramel" class in the library.
var sound:Sound_Caramel=new Sound_Caramel();
the above means I make a new instance of the caramel sound, then play it. 0 means no delay, int.MAX_VALUE means for the max integer number flash can handle (My guess is about 4 billion?)