Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » 'when mouse touches and clicks a color, sound plays' help
- T_IdoubleGuhEr
- Scratcher
2 posts
'when mouse touches and clicks a color, sound plays' help
Hi,
I am making a project and I want it to be so that when A blue color is clicked, a sound plays. (I have a blue bird on a tree sprite and I want it so that when the bird it clicked, it makes a tweeting sound. I thought about making the tree and bird different sprites, but that wouldn't work since I'm doing a parallax and the bird would move off the tree branch when the mouse is moved.) I finally figured out the coding, but I accidentally deleted it and I cannot remember what I did. Can anyone tell me what do to to code this? thanks!
I am making a project and I want it to be so that when A blue color is clicked, a sound plays. (I have a blue bird on a tree sprite and I want it so that when the bird it clicked, it makes a tweeting sound. I thought about making the tree and bird different sprites, but that wouldn't work since I'm doing a parallax and the bird would move off the tree branch when the mouse is moved.) I finally figured out the coding, but I accidentally deleted it and I cannot remember what I did. Can anyone tell me what do to to code this? thanks!
Last edited by T_IdoubleGuhEr (Dec. 16, 2018 03:02:22)
- -Doodlequeen-
- Scratcher
46 posts
'when mouse touches and clicks a color, sound plays' help
this is the best i can do:
but it's not the COLOR, it's the SPRITE. i don't know how to make it the color
when this sprite clicked
play sound [tweet v]
but it's not the COLOR, it's the SPRITE. i don't know how to make it the color
-Doodlequeen-
- -Oltimate-
- Scratcher
62 posts
'when mouse touches and clicks a color, sound plays' help
It's probably best to make the bird and the tree a separate sprite so you can put this script on the bird:
when this sprite clicked
play sound [tweeting sound v]
- JoZaJaB138
- Scratcher
65 posts
'when mouse touches and clicks a color, sound plays' help
i think this is what you want
set a one pixel sprite to always goes to mouse (lets just say we called it “MOUSE2”) and put this code under it (remember to put the pixel over the + in the center
WHEN FLAG CLICKED
FOREVER
IF < MOUSE2 touching color AND mouse down THEN
PLAY SOUND
set a one pixel sprite to always goes to mouse (lets just say we called it “MOUSE2”) and put this code under it (remember to put the pixel over the + in the center
WHEN FLAG CLICKED
FOREVER
IF < MOUSE2 touching color AND mouse down THEN
PLAY SOUND
- T_IdoubleGuhEr
- Scratcher
2 posts
'when mouse touches and clicks a color, sound plays' help
i think this is what you want
set a one pixel sprite to always goes to mouse (lets just say we called it “MOUSE2”) and put this code under it (remember to put the pixel over the + in the center
WHEN FLAG CLICKED
FOREVER
IF < MOUSE2 touching color AND mouse down THEN
PLAY SOUND
could you show this please?
- drchubbington
- Scratcher
100+ posts
'when mouse touches and clicks a color, sound plays' help
when green flag clicked
forever
Be awesome!
end
- annacatyui
- Scratcher
2 posts
'when mouse touches and clicks a color, sound plays' help
when green flag clicked
if <> then
<touching [mouse-pointer v] ?>
play sound [tweet v]
end
- annacatyui
- Scratcher
2 posts
'when mouse touches and clicks a color, sound plays' help
hello if scratch team see this then please bring back the ‘'not touching color’' block. is it deleted?
- kiwilover2736
- Scratcher
1000+ posts
'when mouse touches and clicks a color, sound plays' help
First of all: Please don't post questions that are unrelated to the original post's question hello if scratch team see this then please bring back the ‘'not touching color’' block. is it deleted?
Second of all: Don't post on topic's that haven't been active for a long time.
Third of all: You can just create a “Not touching (color?” block by putting these two blocks together
<not <touching color [#d43c74] ?>>
⋆˖⁺‧₊☽ Just a person who helps in and cleans up the Discussion Forums! ☾₊‧⁺˖⋆
⋆˖⁺ I reached 1000 followers in January of 2024 and made an QNA. I'm now done with answering all the questions, and here's the project for it! ⁺˖⋆
⋆˖⁺ One of my projects was featured! :D Check it out here! ⁺˖⋆
⋆˖⁺ Murder Drones fan!⁺˖⋆
———————————————————————————————————————————————
RANDOM SCRATCHERS OUT OF CONTEXT :D
Za-Chary once said..
Could you remind us what scenes are in ScratchJr and what they do?After all, I If this gets rejected, add this to Za-Chary!AM the list of rejected suggestions.
And Paddle2See once said..
This is not a question for this forum. It's a question for your lawyer.
~Congrats! You found secret links. These are just random images that i might use.~
u.cubeupload.com/eason_9_lol/SxrJFv.png
u.cubeupload.com/eason_9_lol/Wf472Y.png
u.cubeupload.com/eason_9_lol/a8wDJ4.png
- Discussion Forums
- » Help with Scripts
- » 'when mouse touches and clicks a color, sound plays' help