Page 82 - IT_V5.0_Class8
P. 82
Block Explanation
Reports the distance from the sprite to the specified object.
Asks a question and waits for the user’s input.
Reports the answer given by the user.
Checks if the specified key is pressed.
Checks if the mouse button is pressed.
Reports the x position of the mouse pointer.
Reports the y position of the mouse pointer.
Sets the drag mode of the sprite to draggable or not
draggable.
Reports the loudness of the sound input.
Reports the value of the timer.
Resets the timer to zero.
Reports the number of the current backdrop of the Stage.
Reports the current year, month, date, day of the week,
hour, minute, or second.
Reports the number of days since January 1, 2000.
Reports the username of the person using the project.
Example 13: When the Green Flag is clicked, the sprite asks, ‘What’s your name?’ and waits for
a response. Once the name is entered, the sprite becomes draggable, allowing users to move it
around the stage. The entered name is displayed when the Enter key is pressed.
Follow the given steps:
Step 1: Drag and drop the when clicked block to the script area.
Step 2: Drag the ask and wait block from the Sensing blocks category and drop it below the
when clicked block.
80 Information Technology (V5.0)-VIII

