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

#1 2010-09-13 21:39:51

leluudai
New Scratcher
Registered: 2010-08-31
Posts: 1

How do i design program displays with 4 menu choices ?

I have to : add (1) subtract (2), multiply(3), and divide(4).The user will enter a menu choice and two integers. The output will be the result of the selected operation on the two integers.

Thank you !

Offline

 

#2 2010-09-13 21:44:19

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: How do i design program displays with 4 menu choices ?

You could just have four sprites, with a broadcast.

Code:

When Green flag clicked
show

When button 1 clicked
set choice to 1
broadcast start

when I receive start
hide

Would be the scripts for one button of the four.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer