Page 65 - 2611_SmartGPT Pro V(5.0) C-6
P. 65
Similarly, add the given blocks to change the paint colour on the Canvas: when Button2.
Click, set Canvas1.PaintColor to blue; and when Button3.Click, set Canvas1.PaintColor
to green.
Step 20 Click on the Button4 block from the
Blocks palette to open its blocks.
Step 21 Drag the when Button4.Click block
to the workspace.
Step 22 Click on the Canvas1 block from the
Blocks palette to open its blocks.
Step 23 Drag the call Canvas1.Clear block
and place it inside the when Button4.
Click block.
PURE The MIT App Inventor interface supports over 21 languages, making it accessible
FACT worldwide.
Step 24 Click on the Canvas1 block from the Blocks palette to open its blocks.
Step 25 Drag the block when Canvas1.Dragged to the workspace.
Step 26 Drag the call Canvas1.DrawLine block and place it inside the when Canvas1.Dragged
block.
Step 27 Hover the mouse over prevX, select get prevX and connect it to x1 in the DrawLine
block.
Step 28 Hover the mouse over prevY, select get prevY and connect it to y1.
Step 29 Hover the mouse over currentX, select get currentX and connect it to x2.
Step 30 Hover the mouse over currentY, select get currentY and connect it to y2.
Touch to Motion with MIT 63

