This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-11-19 01:58:18

ClevelandStreamer
New Scratcher
Registered: 2012-11-19
Posts: 2

How to change song on project?

I'm making a game for my computer studies class and I guess it requires some sort of background music, for this I chose Bloody Tears from Castlevania Legends. However, when you click this little skull in the bottom right corner it is supposed to change the song to Running in the 90s. It does the job fine but  Bloody Tears continues to play in the background and using the "stop all sounds" command only pauses it briefly before it starts again.
If anyone knows how to solve my problem I'd be very grateful.

Songs (If you want to see how cool this [removed by moderator. Please read the Community Guidelines and use appropriate language] will sound):
Bloody Tears (1997): http://www.scratch.mit.edu/ext/youtube/?v=WY-VYSsUTZw
Running in the 90s: http://www.scratch.mit.edu/ext/youtube/?v=BJ0xBCwkg3E

Last edited by cheddargirl (2012-11-19 03:09:12)

Offline

 

#2 2012-11-19 05:43:37

Gravitation
New Scratcher
Registered: 2012-09-26
Posts: 500+

Re: How to change song on project?

Try this:

when [skull] clicked
stop all sounds
if <(song) = [1]>
 set [song v] to [2]
else
 set [song v] to [1]
end

when gf clicked
set [song v] to [1]
forever
 play sound (song) until done
end
Make sure that Bloody Tears is the first song in the sprite, and Running in the 90s is the second.  smile

Offline

 

Board footer