Set the cat in motion
Even though our script contains only two blocks, we have a problem. When we click on the flag, the sprite switches to a different costume and stops. If we try to click on the flag again, nothing appears to happen, and we can't get back to the first costume unless we go to the Costumes tab and select costume1. That's not fun.
In our next exercise, we're going to switch between both costumes and create a lively animation.
Time for action – a big step
We will continue working with our script from the previous example:
From the blocks palette, select Motion.
Drag the change x by block to the script area for Sprite1 and snap it in place at the end of the script. See the following screenshot for reference:
Double-click on the script and watch your sprite move across the stage.
Tip
Double-clicking on the script runs through each block of the script.
The change x by block has an number field with a default value of 10. This number controls how far the sprite moves. Change 10 to 20.
Double...