Code Your Sprite to Say “Hello” with A Speech Bubble
Code Your Sprite to Say “Hello” with A Speech Bubble
1. First, make sure your sprite is highlighted in the Sprite Pane.
2. Drag a “When Green Flag Clicked” block from the Events category in the Block Palette into the Code Area. This block will tell your code to run when you click on the green flag above the stage.
Every script of code that you create for your sprite to follow must begin with an Events block!
3. Next, go to the Looks category in the Blocks Palette. This category has blocks that will change how your sprite looks. Select the “Say Hello for 2 Seconds” block. Drag this block onto the Code Area and snap it underneath the ‘When Green Flag Clicked’ block.
This ‘Say’ block has two inputs; one for what will be displayed in the speech bubble, and one for the number of seconds that the speech bubble will show on the Stage.
Press the Green Flag on top of the Stage to test your code! When you hit the Green Flag, you’ll notice that the sprite says “Hello” for two seconds!
Views | |
---|---|
1 | Total Views |
1 | Members Views |
0 | Public Views |
Share by mail
Please login to share this webpage by email.