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

#1 2012-03-28 20:31:58

Qaze
Scratcher
Registered: 2010-10-02
Posts: 56

Stopping in the Midde

How do you make something stop in the middle? For example, if you are on a certain background, the drum sounds will play, but how do you make it stop when the next background comes? (The next background comes when you press space so...)
Plz help. Ty


http://i.imgur.com/2i8VY.gif

Offline

 

#2 2012-03-28 21:13:08

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Stopping in the Midde

when gf clicked
forever
if <(background #) = [1]>
play drum () //Put whatever blocks you want it to play here
else
stop all sounds
end
end

Last edited by jji7skyline (2012-03-28 21:13:36)


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#3 2012-03-29 09:47:51

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Stopping in the Midde

when gf clicked
forever
if <not <(background #) = (oldbg)>>
stop all sounds
end
set [oldbg v] to (background #)
Much simpler and stops it after every background change.  wink

Last edited by Hardmath123 (2012-03-29 09:48:45)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#4 2012-03-29 16:41:11

Qaze
Scratcher
Registered: 2010-10-02
Posts: 56

Re: Stopping in the Midde

jji7skyline wrote:

when gf clicked
forever
if <(background #) = [1]>
play drum () //Put whatever blocks you want it to play here
else
stop all sounds
end
end

Doesn't work in what I'm doing, but I figured it out.

Last edited by Qaze (2012-03-29 16:46:39)


http://i.imgur.com/2i8VY.gif

Offline

 

Board footer