Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Scratch 1.4: Beginner's Guide

You're reading from   Scratch 1.4: Beginner's Guide Learn to program while creating interactive stories, games, and multimedia projects using Scratch

Arrow left icon
Product type Paperback
Published in Jul 2009
Publisher Packt
ISBN-13 9781847196767
Length 264 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (17) Chapters Close

Scratch 1.4 Beginner's Guide
Credits
About the Author
About the Reviewer
Preface
1. Welcome to Scratch! FREE CHAPTER 2. Installation 3. Start Scratching 4. Graphics and Slideshows 5. Storytelling 6. Arcade Games 7. Games of Fortune 8. Math and Finance 9. Share! 10. Real-world stimuli Scratch Resources
Index

Time for action – draw the x and y axis of the grid


Right now, the graph looks out of place. Let's draw some reference points to the graph starting with the X and Y axes:

  1. Use the paint new sprite option to draw a small square sprite, and name it grid. You can use any color you want, but I'm using black.

  2. Let's draw the X axis first. From the Motion palette, add the go to x: and y: block. Set our original X and Y coordinates (-200, -140).

  3. From the Pen palette, add the set pen color to block and select black as the color.

  4. From the pen palette, add the pen down block.

  5. From the Motion palette, add the change x by block and set the value to 320. We'll build the graph 20 pixels bigger than we expect to use.

  6. From the Pen palette, add the pen up block.

  7. Next, we need to draw the Y axis. We can use the same block of code with a couple of slight alterations. Duplicate the existing blocks and append it to the script.

  8. Since we want to draw the Y axis, we need to swap out the second change x by block with a change...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image