Reputation: 87
I am trying to create a DJing program in which one song starts when a sprite is clicked and another song starts (and the first one stops) when a second sprite is clicked. My solution has been to create a variable and use it as an on/off boolean, however the first song continues when the second song is activated. The code for the other sprite is the same with the variables changed.
Upvotes: 1
Views: 514
Reputation: 87
I misstated the question: I'd actually like to keep one song playing (even if the other song is activated) until the related sprite (button) is clicked again. But using the suggestion of 'set volume to 0%' I was able to create this solution:
Upvotes: 1
Reputation: 277
In fact you need no boolean. For first sprite the code is
When sprite clicked
stop all sounds
start sound (whatever sound you have)
For other sprite you do the same thing
Upvotes: 0