PDA

View Full Version : How do I stop sound from repeating


AndyJS
12-16-2004, 07:11 PM
How do I stop an mp3 file from playing again and again while allowing the movie to repeat itself forever?

I am trying to allow the movie to repeat forever but stop the mp3 file from playing more than 1 time.

The movie is only 20 frames then repeats. The mp3 file is over 1 minute long. The incomplete actionscript I'm using is:

music = new Sound();
music.attachSound("music01");
music.start(0, 1);
music.setVolume(100);

Thanks in advance for your help,

Andy

toke
12-16-2004, 07:29 PM
you can check for the end position of the sound then stop it when the audio reaches that position.

AndyJS
12-16-2004, 07:45 PM
The sound is in the Library. The sound on the timeline is only one frame and plays using the above actionscript. There are no other frames that allow me to find an end position (except for the 20 frames for the visual part of the move). Please help!

Andy

toke
12-16-2004, 09:28 PM
ok.. hopefully the file i attached work for you. if you have any question let me know but the script is pretty straight and easy to follow.