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

#1 2010-04-28 12:22:05

Jdr421
Scratcher
Registered: 2010-04-20
Posts: 1

Creating Buttons

In Scratch there are many tools when making games. One of these helpful devices is the button. This is how to create a button in Scratch:

1. First, create a sprite that has two costumes. The second costume should be similar to the first. For instance, if a gradient button is first, a solid button should be second.

2. Second, go to the control tab and drag into that sprite's script the "when green flag clicked" script starter. After that, drag in the "forever if" condition.

3. After that, go to the operators tab and select the "blank and blank" operator. Put this into the slot in the forever if condition.

4. In the blank and blank operator, there are two slots. Go to the sensing tab and put in the slots the "touching mouse-pointer" and the "mouse-down" sensors.

5. In the condition, put in the "switch to next costume" looks bar. Then go to the control tab and select the wait bar. Change the amount to 0.3 seconds. Then go back to the looks tab and put after that the next costume bar.

This way, your button will change when presses.

Good luck!

Jdr421

Offline

 

Board footer