Here’s the situation, I’ll try to be clear and concise:
**Say you have a single-scene 170 frame long movie.
**The first two frames contain a preloader function.
**Following the preloader is a very short introduction.
**Then, the real stuff begins including a background SOUND LOOP that begins at say frame 70.
**Now here’s the actual problem: I want the sound loop to only play between frames 70 and 170. Nowhere else, especially not over the preloader if someone happens to restart the movie.
-Which is what happens now. It plays fine the first time, but then the loop just keeps going and going no matter what.
moviesound = new Sound();
moviesound.attachSound("linkage name")
In frame 70, add this code:
moviesound.start([1]);
This will make it loop only once. If you’d like it to loop constantly until frame 170, however then in frame 70 add only:
moviesound.start();
and in frame 1 add
moviesound.stop();
idName is the linkage name to your sound clip in the Library. (Click Import to Library from the File menu, then right-click the sound in the library and select “linkage”… make sure Export for ActionScript and Export in First Frame are checked).