Skip to main content
Known Participant
May 21, 2023
Question

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

  • May 21, 2023
  • 1 reply
  • 377 views

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 has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
May 22, 2023

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

Known Participant
May 22, 2023

Played by code

kglad
Community Expert
Community Expert
May 22, 2023

use:

 

if(!this.alreadyExecuted){

this.alreadyExecuted=true;

// your sound code

}