events the brown events block in scratch starts script's when certain things happen. for...

7
Events • The brown events block in Scratch starts script's when certain things happen. For example, when the user presses a key, clicks sprites, or uses a webcam or microphone.

Upload: albert-adams

Post on 16-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Events The brown events block in Scratch starts script's when certain things happen. For example, when the user presses a key, clicks sprites, or uses

Events

• The brown events block in Scratch starts script's when certain things happen. For example, when the user presses a key, clicks sprites, or uses a webcam or microphone.

Page 2: Events The brown events block in Scratch starts script's when certain things happen. For example, when the user presses a key, clicks sprites, or uses

What are Clicking Events?

Page 3: Events The brown events block in Scratch starts script's when certain things happen. For example, when the user presses a key, clicks sprites, or uses

What are Key Press Events?

Page 4: Events The brown events block in Scratch starts script's when certain things happen. For example, when the user presses a key, clicks sprites, or uses

Sound Events

Using a microphone, sprite can detect how loud sounds in a room are on a scale of 0 (very quite) to 100 (very loud). “when loudness >10” block to make a script start when the sound is loud enough.

Page 5: Events The brown events block in Scratch starts script's when certain things happen. For example, when the user presses a key, clicks sprites, or uses

Sound Event

• Start a new project, and add the “room 3” backdrop image from the backdrop library. Drag the cat sprite on to the chair and add the script shown here:

Page 7: Events The brown events block in Scratch starts script's when certain things happen. For example, when the user presses a key, clicks sprites, or uses

What are Webcam Motion Detectors?

Webcams can be used in Scratch 2.0. Add this script to the cat, and when you wave at the webcam the cat will meow back.

Use the “when loudness >10” block,. Click the menu to change “loudness” to “video motion”. The script will start when you’re moving around.