Home Page Icon
Home Page
Table of Contents for
Learning How to Write Scratch Programs
Close
Learning How to Write Scratch Programs
by Jerry Lee Ford
Scratch™ Programming for Teens
Copyright
Acknowledgments
About the Author
Introduction
Scratch Basics
Introducing Scratch
Getting to Know Scratch
Installing Scratch
Creating Your First Scratch Application
Joining Scratch’s Global Community
Summary
Getting Comfortable with the Scratch Development Environment
Getting Comfortable with the Scratch IDE
Creating New Sprites Using Scratch’s Paint Editor
Summary
A Review of the Basic Components of Scratch Projects
Working with Blocks and Stacks
Three Basic Types of Scratch Blocks
Keeping an Eye Out with Monitors
Eight Categories of Scratch Blocks
Getting Help with Code Blocks
Summary
Mr. Wiggly’s Dance—A Quick Scratch Project
Programming with Scratch
Creating the Mr. Wiggly’s Dance Application
Distributing Scratch Projects
Summary
Learning How to Write Scratch Programs
Moving Things Around
Working with Motion Code Blocks
Moving and Rotating Sprites
Setting Sprite Direction
Repositioning a Sprite
Changing Sprite Coordinates
Keeping Track of Sprite Coordinates and Direction
Taking Advantage of Scratch Cards
Creating the Virtual Scratch Fish Tank
Summary
Sensing Sprite Position and Controlling Environmental Settings
Working with Sensing Code Blocks
Retrieving Mouse Button and Coordinate Status
Determining when Keys Are Pressed
Determining when Sprites Collide with Other Objects
Determining Distance
Working with a Timer
Retrieving Stage and Sprite Data
Retrieving Audio Data
Code Blocks That Work with Sensor Boards
Creating the Family Scrapbook Application
Summary
Storing and Retrieving Data
Learning How to Work with Application Data
Storing Data in Variables
Deleting Variables when They Are No Longer Needed
Accessing Variables Belonging to Other Sprites
Working with Variable Monitors
Two Quick Examples
Developing the Basketball Quiz Project
Summary
Doing a Little Math
Addition, Subtraction, Multiplication, and Division
Understanding the Mathematical Order of Precedence
Generating a Random Number
Comparison Operations
Performing Logical Comparisons
Rounding Numbers and Retrieving Remainders
Working with Built-in Mathematical Functions
Developing the Number Guessing Game Quiz Project
Summary
Conditional and Repetitive Logic
Introducing Scratch Control Blocks
Event Programming
Pausing Script Execution
Executing Loops
Sending and Receiving Broadcasts
Conditional Programming Logic
Terminating Script Execution
Developing the Ball Chase Game
Summary
Changing the Way Sprites Look and Behave
Changing Sprite Costumes and Backgrounds
Making Sprites Talk and Think
Applying Special Effects to Costumes and Backgrounds
Changing a Sprite’s Size
Making Sprites Appear and Disappear
Determining What Happens when Two Sprites Overlap
Developing the Crazy Eight Ball Game
Summary
Spicing Things Up with Sounds
Playing Sounds
Play a Drum
Playing Musical Notes
Configuring Audio Volume
Setting and Changing Tempo
Creating the Family Picture Movie
Summary
Drawing Lines and Shapes
Clearing the Stage Area
Drawing with the Pen
Setting Pen Color
Changing Pen Shade
Working with Different Size Pens
Stamping an Instance of a Costume on the Stage
Creating the Doodle Drawing Application
Summary
Advanced Topics
Sharing Your Scratch Projects over the Internet
Running Scratch Applications on the Internet
Registering with the Scratch Website
Uploading Your Scratch Applications
Viewing and Organizing Your Applications Online
Downloading Other People’s Projects
Summary
Collecting External Input Using a Scratch Board
Interacting with the Real World
Buying a Scratch Board
Installing Your Scratch Board
Using the Button Control to Initiate Action
Summary
Finding and Fixing Program Errors
Dealing with Application Errors
Debugging Your Scratch Applications
Watch Out when Removing Sounds and Sprites
Getting Help
Summary
Appendices
What’s on the Companion CD?
Scratch Project Source Code
Scratch Installation Files for Microsoft Windows and Mac OS X
What Next?
Locating Scratch Resources Online
Recommended Reading
Glossary
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Summary
Next
Next Chapter
Moving Things Around
Part II: Learning How to Write Scratch Programs
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset