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

#1 2009-08-11 02:54:27

hgibbs
Scratcher
Registered: 2009-08-11
Posts: 4

Changing background when clicking on a picture (sprite)

I want to change my background to create a new page when I click on a picture ( becomes a sprite when added). Can anyone help me?

Offline

 

#2 2009-08-11 05:18:27

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Changing background when clicking on a picture (sprite)

Sure...probably the easiest way is to use the "Broadcast" block on the sprite that you want people to click on in a script like this

[blocks]
<when[ Sprite 1 ]clicked>
<broadcast[ New Page
[/blocks]

You can choose any name you want for the message - I picked "New Page" for this example.  Then, in the Stage area, put a script like this

[blocks]
<when I receive[ New Page
<switch to costume[ Whatever
[/blocks]

Only it will be "switch to background" not "switch to costume".  Hope that helps!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2009-08-11 19:11:17

hgibbs
Scratcher
Registered: 2009-08-11
Posts: 4

Re: Changing background when clicking on a picture (sprite)

Thanks that was helpful but the other objects remain on the page do you know how to have the background displayed without the other objects?

Offline

 

#4 2009-08-11 21:52:14

hamsandwitch678
Scratcher
Registered: 2008-10-15
Posts: 100+

Re: Changing background when clicking on a picture (sprite)

{When i receive new page}
(hide)

Do that in the sprites' scripts  (the ones you want to hide)

Sorry I can't do the blocks!

Last edited by hamsandwitch678 (2009-08-11 21:53:04)


You won't get in a jam when you add a little ham because when you add meat, your life will be sweet.                     .

Offline

 

Board footer