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

#1 2012-05-29 18:06:51

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

when clicked problem

I have this project where if you click a button, it changes to the other costume it isn't when you click it, something like this.

When gf Clicked
Forever
If <<touching [mouse-pointer v]> and (mouse down?)>
If <(costume#)(=)(1)>
Switch to Costume [costume 2 v]
end
If <(costume#)(=)(2)>
Switch to Costume [costume 1 v]
end
end
Thanks!  smile


http://i48.tinypic.com/2072ctw.gif

Offline

 

#2 2012-05-29 18:26:04

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: when clicked problem

powerpoint56 wrote:

I have this project where if you click a button, it changes to the other costume it isn't when you click it, something like this.

When gf Clicked
Forever
If <<touching [mouse-pointer v]?> and (mouse down?)>
If <(costume#)=(1)>
Switch to Costume [costume 2 v]
end
If <(costume#)=(2)>
Switch to Costume [costume 1 v]
end
wait until <not <<touching [mouse-pointer v]?> and (mouse down?)>>
end
Thanks!  smile

Fixed...this should work.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#3 2012-05-29 18:33:52

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

Re: when clicked problem

You could just use a simple

when [sprite] clicked
next costume

Last edited by jji7skyline (2012-05-29 18:35:32)


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

Offline

 

Board footer