Scratch Lesson 5: Work with the Stage


In this lesson, I will show you how to make sprites move to certain locations on the Stage. The Scratch Stage uses X-Y Coordinate System that looks as follow:

To demonstrate how to let sprites move by themselves, we will create a basic scene and three sprites with very simple scripts. A scene, like a movie scene, sets the tone of the story and provides a platform for the characters in the story.

Step 1:              Create a Simple Scene

First, double click to select Stage.

Click “Costumes” tab and there is a default background called “background1”. Click “Edit”.

Use Line Tool, Box Tool, and Circle Tool to create outline of two houses and a plate. Then use Fill Tool to fill in colors. When done, hit “OK”.

Step 2:              Adding Simple Movement Scripts to Sprites

If you have not already, create three sprites: Mr. Meow (use the Scratch Cat), Donut Man, and Donut. Now let’s add scripts so that all sprites will show up in the right places when the animation starts (when the Start Flag is clicked).

Move three sprites as shown at the right. Donut Man to the green house, Mr. Meow to the red house, and Donut to the plate.

*

The x-axis and y-axis values are updated accordingly when moved. When a sprite is moved, the Motion blocks (“go to x=? y=?” block and “glide ? secs to x: ? y: ?” block) in the Tool Box are updated as well.

*

*

 

To build Mr. Meow’s scripts, select Mr. Meow from the Sprites Area, then click “Scripts” tab. From the Tool Box, click the “Control” button and drag “when Start Flag clicked” block to drop it in Scripts work area.

*

 

Then click “Motion” button in Tool Box Selection and drag “glide 1 secs to x:-183 y:-110” to the Stage. Then attach it under the “when Start Flag clicked” block.

*

Then click “Looks” button in Tool Box Selection, and drag “switch to costume1” to the Stage. Then attach it under the “glide 1 secs to x:-183 y:-110”.

*

Step3:              Do the same for Donut Man and Donut

In the same way, create similar scripts for the Donut Man and the Donut.

Below is what result scripts should look like. Note that your x-axis and y-axis values will very likely be different than mine, and it’s OK.

* * *

*

   TEST: Move sprites around in the Stage and clicking the Start to see all of the sprites gliding back to their positions.

One thought on “Scratch Lesson 5: Work with the Stage

  1. Hello, I think your site might be having browser compatibility issues. When I look at your blog in Firefox, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, excellent blog!

Leave a Reply

Your email address will not be published.