20.03.2013 Views

Introduction to Computer Science with Scratch and App Inventor

Introduction to Computer Science with Scratch and App Inventor

Introduction to Computer Science with Scratch and App Inventor

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

When the canvas is created, it is given the default name Canvas1 by <strong>App</strong> Inven<strong>to</strong>r. Let’s rename the<br />

canvas – we will give all of our elements new names <strong>to</strong> help us keep them straight when we are writing<br />

our program. To rename the canvas:<br />

Now we will change the size of our canvas<br />

element. Again, make sure that the<br />

MyCanvas element is selected in the<br />

Components part of the screen. In the<br />

Properties section, change the width <strong>and</strong> the<br />

height <strong>to</strong> 300 pixels.<br />

Note the other properties that you can set at<br />

this point. For each element we use, there<br />

will be a selection of properties that you can<br />

set using this panel of the <strong>App</strong> Inven<strong>to</strong>r.<br />

1) In the Components section of the<br />

screen make sure that Canvas1 is<br />

selected (highlighted green)<br />

2) Click on the rename but<strong>to</strong>n at the<br />

bot<strong>to</strong>m of the panel<br />

3) In the dialog that pops up, give the<br />

canvas element a new name, I am going<br />

<strong>to</strong> call mine MyCanvas<br />

Now that we have our canvas all set up, we need <strong>to</strong> add our mole image. Go <strong>to</strong> this url:<br />

http://appinven<strong>to</strong>r.googlelabs.com/learn/tu<strong>to</strong>rials/molemash/MoleMashAssets/mole.png<br />

You will need <strong>to</strong> save the mole image <strong>to</strong> your desk<strong>to</strong>p. To do this<br />

on a PC, right-click on the image (on a Mac, hold down the CTRL<br />

but<strong>to</strong>n <strong>and</strong> click the mouse). Choose Save Image As from the<br />

menu that pops up. Make sure you save the image on your<br />

desk<strong>to</strong>p so that you can easily find it later.<br />

mbrace Game Development Workbook Page 36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!