Pages: 1
Topic closed
Hey guys,
I have been trying to add music into my project, this works fine, but I also want a Music control sprite so if it's clicked it stops music and starts it again if clicked again.
I want it to have two costumes, one for Music ON and Music OFF.
I tried multiple things to get this to work, it worked offline but online it didn't.
Any ideas for scripts I could use?
Thanks guys =]
Offline
If you want the music to restart when it's been turned off:
When Music_off clicked
Stop all sounds
When Music_on clicked
Play music
If you want the music to continue:
When Music_off clicked
set volume to 0
When Music_on clicked
set volume to 100
Do those work?
Offline
To do it all with one sprite, and changing costumes:
[When Green Flag Clicked]
[Set variable "on" to 1]
[forever]
[If spriteButton clicked?]
[If on = 1]
[switch to costume "off"]
[stop all sounds]
[Else]
[switch to costume "on"]
[play sound "sound"]
[End If]
[End Forever]
Hope that works.
Last edited by cocoanut (2010-01-11 23:13:21)
Offline
Complexity is good for space and simplicity helps get the project to work.
Last edited by Chrischb (2010-01-12 01:58:02)
Offline
Topic closed
Pages: 1