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

#1 2013-02-23 21:16:45

bob6
Scratcher
Registered: 2010-07-01
Posts: 100+

Clickable button

How do I make a *purely* clickable button?
If I do "if touching mouse and mouse down" then it works fine, except...
for when I just hold down the mouse button, and THEN hover the mouse over the button.
I want it so that you HAVE to be on the button first before you can click it and make it work.
Thanks in advance,
bob6


http://i46.tinypic.com/3148ksz.gif

Offline

 

#2 2013-02-23 23:27:56

gristly
New Scratcher
Registered: 2013-02-08
Posts: 3

Re: Clickable button

Just do


when Sprite1 clicked

Offline

 

#3 2013-02-23 23:37:24

gristly
New Scratcher
Registered: 2013-02-08
Posts: 3

Re: Clickable button

Oops, that didnt quite work. guess it doesnt wanna recognize imaginary sprites XD. Anyway, in the Control section, there is a 'when [spritename] clicked' function.

Offline

 

#4 2013-02-23 23:50:10

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Clickable button

yes, just put:

when [play button] clicked
broadcast [play v]
Or:

when gf clicked
if <mouse down?>
if <touching? [play button v]>
wait until < not <mouse down?> >
broadcast [play v]
end
end
Hope that helps,

CAA14

P.S. Please tell me which one works best for you.

Offline

 

Board footer