Scratch basics: your first project
FoundationScratch builds programs with blocks — no typing. Sprites perform on the stage; things start with 'when green flag clicked', and blocks run top to bottom.
- Scratch = block coding, no typing needed
- Sprites act on the stage; events (the flag) start scripts
- Blocks run top to bottom in sequence
§Text Passage
1Scratch, developed by the MIT Media Lab in the United States, is a block-based programming tool: like building with LEGO, you drag coloured command blocks into the scripting area and stack them into a working program. With no syntax to memorise, beginners can focus on the three basic structures — sequence, loops and conditions — and add sprites, sounds and backdrops to make projects lively and fun.
2A first project usually begins by choosing a backdrop, then dragging the 'when green flag clicked' block from the Events category and stacking commands such as 'move 10 steps' and 'say Hello!' beneath it; press the green flag and the sprite moves at once, giving an instant sense of achievement. Once confident, add sensing and repeat blocks — reacting to the mouse, counting runs, keeping score with sound effects — to design more complete games or interactive stories.
3Many primary and secondary schools in Hong Kong hold Scratch competitions, and the Hong Kong Science Museum and the Education Bureau offer free workshops and teaching materials. Setting the stage inside an MTR train, a dai pai dong or a street market gives a project a real Hong Kong flavour. The logical thinking and structural ideas learned in Scratch transfer directly to text languages such as Python later on.
1Summary 重點摘要
Scratch builds programs with blocks — no typing. Sprites perform on the stage; things start with 'when green flag clicked', and blocks run top to bottom.
2Vocabulary cards Vocabulary
The actor on the stage: the cat, a ball, any picture.
The background where sprites perform.
The trigger that starts a script, e.g. 'when green flag clicked', 'when space key pressed'.
Blocks run from top to bottom, one by one.
Motion (blue) moves and turns the sprite; Looks (purple) makes it talk, grow or change colour.
A mistake in a program is a bug; debugging means finding and fixing the wrong block.
The area on the left where you pick blocks, sorted by colour into categories.
The middle area where you stack blocks to build a script.
3Step by step Steps
- Four areas of the screenWhen Scratch opens, the screen has four areas: the block palette on the left, where blocks are sorted by category; the script area in the middle, where blocks are dragged and stacked; the stage at the top right, where sprites perform and results appear instantly; and the sprite list at the bottom right, managing every Sprite. The basic flow: drag blocks from the palette into the script area, stack them, then click the green flag above the stage to run.
- Blocks come in coloursBlocks are grouped into colour-coded categories: Motion (blue) moves and turns the sprite; Looks (purple) controls speech bubbles, size and colour effects; Sound (pink) plays audio; Events (yellow) start scripts, such as 'when green flag clicked'; Control (orange) provides repeats and ifs; Sensing (light blue) asks questions and detects touches. Memorising the colours means the right block is found instantly.
- Your first programThe first program needs only three blocks: drag 'when green flag clicked' from Events, attach 'move 10 steps' from Motion, then 'say Hello! for 2 seconds' from Looks. Click the green flag to test: the cat moves forward and a bubble shows 'Hello!'. Running one block after another from top to bottom is called a sequence — Scratch always runs the top block first, then the next, and the order never changes.
- Add interactionTo add interaction, switch to a keyboard event: replace 'when green flag clicked' with 'when space key pressed', and the stack runs only when the key is pressed. An event block must sit at the very top of a stack — it is the power switch, and without one the blocks below never run, however neatly stacked. Try two different events: one action on the green flag and another on the space key, giving one project two ways to play.
- DebuggingPrograms going wrong is completely normal, and fixing mistakes is called debugging. Check one block at a time: click a single block and watch its immediate effect; compare what you expected with what actually happened, find the faulty block and fix its number or swap the block — no need to rewrite the whole program. If the cat turns the wrong way, just change 'turn right 90 degrees' to 'turn left 90 degrees' and test again.
- Adding sprites and savingClick 'Choose a Sprite' in the sprite list to pick one from the library, draw one with the paint editor, or upload a picture from the computer; click the backdrop thumbnail to change the stage background — a classroom or a street, for example — to give the project a setting. When finished, save: 'File → Save to your computer' stores the project as a .sb3 file, and 'File → Load from your computer' reopens it later for more editing.
4Diagrams Diagrams
5Worked example Example
Example: what shape does the cat draw with 'when green flag clicked → repeat 4 [move 50 steps → turn right 90 degrees]'?
- Repeat 4 times: four straight runs
- Each run moves 50 steps then turns right 90 degrees
- Four straight sides + four right-angle turns
- 4 × 90 = 360 degrees: exactly one full turn, back to the start
- Answer: The cat draws a square with 50-step sides — the classic 'draw a square' program.
6Common mistakes Mistakes
7Quick check Quick check
Q1'When green flag clicked' belongs to which category? A. Events B. Motion C. Looks
Q2Where does a sprite perform?
Q3In what order does a stack of blocks run?
Q4What file extension does a Scratch project get when saved to your computer?
Q5Which category does 'say Hello! for 2 seconds' belong to?
8Recap Recap
- Scratch = block coding, no typing needed
- Sprites act on the stage; events (the flag) start scripts
- Blocks run top to bottom in sequence
- Bugs are normal: debug block by block
- Blocks sort by colour: blue motion, purple looks, yellow events, orange control