Page 28 - Touchcode_C7_Flipbook
P. 28
Step 3: Select the block ‘set blueSquare’
from ‘Variable’, and from image
select the block ‘create image
width 0 height 0’. Drag the ‘create
image width 0 height 0’ block to
‘set blueSquare’ block. Drag and drop the block to ‘on start’ block. (Change the
value of width and height to 32 and 32)
Step 4: From ‘Image’ select ‘fill picture with’
block. Click on the drop-down arrow
and select ‘blueSquare’, and change
the color to ‘pink’. Drag the block to
‘on start’ block and drop it to below
the ‘set blueSquare’ block.
Step 5: From ‘Variable’ select, ‘set showBlue to 0’ block. From ‘Sprite’ select ‘sprite of
kind’ block, click on the dropdown and select ‘blueSquare’. Drag ‘sprite of kind’
block to ‘set showBlue’ block and drop the block to ‘on start’ block.
Step 6: Click on the ‘on start’, OR on the ‘Start the simulator’ button present on the left
hand side to view the output:
Well done, you have learned to draw a square!
26 Touchcode-VII

