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

#1 2013-04-16 15:15:28

SirSmurfie
New Scratcher
Registered: 2013-04-16
Posts: 1

Main menu

Hey guys!
I have been trying to make a game for school.To make it more fun Im trying to make a main menu.i have been using a sprite to do this its just a red button.Please tell me how to make that button change the backround to backround 2. Thx!

Offline

 

#2 2013-04-16 16:11:59

shadowmouse
New Scratcher
Registered: 2013-02-03
Posts: 100+

Re: Main menu

Give it the script:
when button clicked
broadcast [next background v]

and on the background
when gf clicked
switch to background background 1

when I recieve [next background v]
switch to background background 2

Offline

 

#3 2013-04-16 16:12:48

EH7meow
Scratcher
Registered: 2013-03-23
Posts: 24

Re: Main menu

What you need to do is go to the scripts for the red button. Then make the script:

when [Red Button] clicked
broadcast [Go To Background 2 v] 
Now go to the Stage's scripts and do:
when I receive [Go To Background 2 v]
switch to background [background 2 v]
I wasn't able to do this when I made one of my first projects.

Hope this helps.

Last edited by EH7meow (2013-04-23 13:32:36)


Love lovehearts? Love mending lovehearts? Then you'll love Love Doctor

Offline

 

#4 2013-04-16 16:19:46

joshuaho
Scratcher
Registered: 2012-08-20
Posts: 100+

Re: Main menu

SirSmurfie wrote:

Hey guys!
I have been trying to make a game for school.To make it more fun Im trying to make a main menu.i have been using a sprite to do this its just a red button.Please tell me how to make that button change the backround to backround 2. Thx!

Here is what you can do. Lets say that you are in play mode.

when I receive [play]
go to x[-160], y[-143]
show
end


when Menu button clicked
broadcast [main menu]
hide
There is no such thing as when--- clicked in red blocks.
But you can find a when --- clicked block in the yellow control blocks.

Last edited by joshuaho (2013-04-16 16:21:04)


Did you know that you can go to space and see Mars by clicking here?

Offline

 

#5 2013-04-16 19:20:17

7734f
Scratcher
Registered: 2010-12-23
Posts: 500+

Re: Main menu

joshuaho wrote:

SirSmurfie wrote:

Hey guys!
I have been trying to make a game for school.To make it more fun Im trying to make a main menu.i have been using a sprite to do this its just a red button.Please tell me how to make that button change the backround to backround 2. Thx!

Here is what you can do. Lets say that you are in play mode.

when I receive [play v]
go to x:[-160] y:[-143]
show
end


when [Menu button] clicked
broadcast [main menu v]
hide
There is no such thing as when--- clicked in red blocks.
But you can find a when --- clicked block in the yellow control blocks.

Fixed  smile  You missed some syntax

With regards
7734f


http://internetometer.com/image/38992.png   http://i37.tinypic.com/2qixx6c.png

Offline

 

#6 2013-04-16 22:01:20

joshuaho
Scratcher
Registered: 2012-08-20
Posts: 100+

Re: Main menu

7734f wrote:

joshuaho wrote:

SirSmurfie wrote:

Hey guys!
I have been trying to make a game for school.To make it more fun Im trying to make a main menu.i have been using a sprite to do this its just a red button.Please tell me how to make that button change the backround to backround 2. Thx!

Here is what you can do. Lets say that you are in play mode.

when I receive [play v]
go to x:[-160] y:[-143]
show
end


when [Menu button] clicked
broadcast [main menu v]
hide
There is no such thing as when--- clicked in red blocks.
But you can find a when --- clicked block in the yellow control blocks.

Fixed  smile  You missed some syntax

With regards
7734f

Thanks.  smile


Did you know that you can go to space and see Mars by clicking here?

Offline

 

#7 2013-04-17 20:48:36

Photoguy77
New Scratcher
Registered: 2013-02-16
Posts: 9

Re: Main menu

Play Sprite:

When gf clicked
show

when i receive [show buttons]
show




when I am clicked
broadcast [playbuttonclicked v]
hide
Stage:
when gf clicked 
switch to background [titlescreen v]

when i receive [helpscreen]
switch to background [helpscreen]
wait (10) secs.
broadcast [show buttons]
switch to background [titlescreen]

when i receive [play]
switch to background [play]
Help Button:

when gf clicked
show
[/SCRATCHBOLCKS]
[SCRATCHBLOCKS]
when I am clicked
broadcast [help]
hide

when i receive [show buttons]
show
Oh......... the red when i am clicked is a new script.




        -Photoguy77:D

Offline

 

Board footer