How do I make it that if a frame is exited it plays a sound

How do I make it that if a frame is exited it plays a sound, yes I know I copied and pasted the title because I have no idea why.

I am using candlesticks for this.

Just play the sound on the frame your entering, there might also be a frame exit function I forgot

1 Like

yes! there is a frame exit function called unload, so just put you sound there!

1 Like

but how do I code it there without the system saying the code is wrong
the sound that is gonna play is called GoofyLose.mp3

playSound(“sound file”);

This should work
For the sound file mp3 and wav files work, make sure that the sound file has .mp3 or .wav after the name

1 Like



Candlesticks is broken

Is the sound file an mp3? Because if it’s not and you say it’s an mp3 it will break

If it is a mp3 just switch to normal wick editor

i remember the “unload” script not working at some point, so i wouldn’t use it. your best bet is to just use playSound() right before gotoAndStop().

as for the

as for this, it’s not very clear in the video but i have a feeling that the quotes around the sound file are what’s causing it. the forum (and many other places where you can input text) will autoformat single and double quotes to be “angled” inward, but basically all code editors only recognize the non-angled ones. if you delete and retype the quotes, it should fix it.

1 Like