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

#1 2012-05-26 13:25:07

gfchll
Scratcher
Registered: 2012-04-21
Posts: 100+

help with appearing and dissap;earing

I want to do something where when you click the mouse, the sprite disappears. when you click the mouse again, it will appear. I've tried many things, but nothing works. could you help me?


HELLO EVERYBODY!

Offline

 

#2 2012-05-26 13:27:33

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: help with appearing and dissap;earing

when gf clicked
set [Hidden? v] to [false]
forever
if <mouse down?>
if <(Hidden?) = [true]>
set [Hidden? v] to [false]
show
end
if <(Hidden?) = [false]>
set [Hidden? v] to [true]
hide
end
wait until <not<mouse down?>>
end
end

Last edited by amcerbu (2012-05-26 13:29:07)

Offline

 

#3 2012-05-26 13:29:09

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: help with appearing and dissap;earing

Try this:

when gf clicked
show
forever
  wait until <mouse down?>
  hide
  wait until <not <mouse down?>>
  wait until <mouse down?>
  show
  wait until <not <mouse down?>>
end


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#4 2012-05-26 13:38:36

sanjayraj
Scratcher
Registered: 2012-03-25
Posts: 500+

Re: help with appearing and dissap;earing

That works...


http://i46.tinypic.com/23sw40j.png

Offline

 

#5 2012-05-26 13:39:53

sanjayraj
Scratcher
Registered: 2012-03-25
Posts: 500+

Re: help with appearing and dissap;earing

If you use SciTecCf's scripts that will probably work for you. I tried it and it worked.

Last edited by sanjayraj (2012-05-26 13:40:14)


http://i46.tinypic.com/23sw40j.png

Offline

 

Board footer