Copy link to clipboard
Copied
Hello
I have an As3 simple game with navigation buttons. It starts off with short intro with sound. When the game loads and the player dies it goes to retry screen with button which when is pressed goes back to the game. The problem is that when that happens flash plays the music from the short intro when returning to the game. How Do I stop this from happening. Currently I have no code for the sound. I just added the music directly to the frame with the intro and that's it. So what code do I write for the sound to execute only once?
Copy link to clipboard
Copied
Either stretch the music layer out to the entire main timeline and configure that layer to loop only 1 time (thus returning to frame 1 doesn't "change a keyframe"), do not return back to frame 1, or use code to play the sound. If the latter is the choice then there is no shortage of examples of how to play:
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d21.html
Copy link to clipboard
Copied
Thank you very much for your answer I figured it out. It was confusing to me because always talks about URL's in the examples and my sound was inside the project.
Copy link to clipboard
Copied
Glad you got back to progress. If you're all set please mark a correct answer so we can filter unanswered questions.
You're welcome and good luck!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now