Scratch Notes (Just Scratching!)

Scratch is an interactive visual coding program using blocks. Just like Lego. But the build is the opposite. You build from the top down.

This Page Page One - Scripts info
Page Two - Costumes/Backdrops/New Sprites
Page Three - Copying Sprites and Sprite Coding

How to get started, creating your Scratches from the 16 tasks.


Scratch programming notes.
From left to right, in the upper left area of the screen, there is a stage area, featuring the results (i.e., animations, everything either in small or normal size, full-screen also available) and all sprites thumbnails listed in the bottom area.
The stage uses x and y co-ordinates, with 0,0 being the stage centre.
The stage is 480 pixels wide, and 360 pixels high, x:240 being the far right, x:-240 being the far left, y:180 being the top, and y:-180 being the bottom.

These are the scripting categories and how they operate:


Category

Notes

  

Category

Notes

 

Motion

Moves sprites and changes angles and change X and Y values

  

 

Events

Contains event handlers placed on the top of each group of blocks

 

Looks

Controls the visuals of the sprite; attach speech or thought bubble, change of background, enlarge or shrink, transparency, shade

 

Control

Conditional if-else statement, "forever", "repeat", and "stop"

 

Sound

Plays audio files and programmable sequences

 

Sensing

Sprites can interact with the surroundings the user has created

 

Pen

Draw on the portrait by controlling pen width, color, and shade. Allows for turtle graphics.

 

Operators

Mathematical operators, random number generator, and-or statement that compares sprite positions

 

Data

Variable and List usage and assignment

 

More Blocks

Custom procedures (blocks) and external devices control and can import from PicoBoard or Lego WeDo 1.0/2.0

Besides the Scripts tab, there are two additional tabs, the Costumes tab and the Sounds tab. An expandable bar at the right “?’ is the Help area.
A script is defined within the Scratch program as one or a set of blocks that begins with a Hat Block. Even a single block can qualify. However, scripts are usually referred to as sets of blocks that consist of at least two blocks.

There are 10 coding Scripts to become familiar with:

Each of these scripts has script blocks underneath them, with the exception of Events, which has hats.

The Data and More Blocks scripts allow more complex 'build your own codes'.

 

In the control scripts, you can set the parameters such as 'wait' and 'repeat' to the level you want.

To create a variable that is not shown is simply to make a variable, then using the code

If the 'Add an Extension' (above) option appears - just ignore it.