Page 91 - KEC Khaitan C5 Flipbook
P. 91
Step 5 Drag and drop Ball from Drawing and Animation palette on the canvas.
Step 6 Set 20 in the Radius textbox and Pink colour to it.
Step 7 Clear the Visible checkbox to set the visibility to false.
Now, perform the following steps to code a Drawing app:
Step 1 Click on the Blocks button ( )in the MIT App Inventor window. This opens
Block Editor, where you can add coding blocks.
Step 2 Click on the Canvas block. The list of coding blocks appears.
Step 3 Drag and drop the when Canvas1.Touched coding
block to the workspace.
Step 4 Click on the Balls block. The list of coding blocks
appears.
Step 5 Drag and drop the set Ball1.X to coding block inside the
when Canvas1.Touched coding block.
Step 6 Hover the mouse on x option in the when Canvas1.
Touched coding block.
Step 7 Click on get x block and place it in blank.
Step 8 Click on the Balls block. The list of coding blocks
appears.
Step 9 Drag and drop the set Ball1.Y to coding block inside the when Canvas1.Touched
coding block.
Step 10 Hover the mouse on y option in the when
Canvas1.Touched coding block.
Step 11 Click on get y block and place it in blank.
UI Design and Touch Events 89

