Skip to main content
Known Participant
May 21, 2023 9:44 PM UTC
Question

How to mute sounds in movieclips but not make them play again.

I was tweaking a game I reskinned back in 2020 and I wanted to add screen that showed the credits. I learned little bits of code and I was able to make the credits scene appear on frame 2 of the stage and the music stops. The problem is that the game itself is one big movieclip made out of little clips and when I clicked the go back button to back to the game,  the first instance of the song plays back and a new instance of the song plays, and it sounds all wrong. Is there a way to fix this?

Here's a link to download the game. 

https://www.mediafire.com/file/4szupyjzcvus4r9/CartRider3.1.fla/file

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

kglad
Community Expert
Community Expert
May 22, 2023 3:55 AM UTC

is the song played by code or by having it attached to a timeline?

Translate
Known Participant
May 22, 2023 11:56 AM UTC

Played by code

Translate
kglad
Community Expert
Community Expert
May 22, 2023 1:34 PM UTC

use:

 

if(!this.alreadyExecuted){

this.alreadyExecuted=true;

// your sound code

}

Translate