Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 85 - CodePilot V5.0 C6
P. 85

    Step  13    Click on the Blocks button in the top-right corner to switch to the Blocks Editor.

                     Step  14    Click on the Button1 block from the Blocks palette to open its blocks.

                     Step  15    Drag the when Button1.Click block to the workspace.

                     Step  16    Click on the Canvas1 block from the Blocks palette to open its blocks.
                     Step  17     Drag the set Canvas1.PaintColor to block and place it inside the when Button1.Click

                                 block.

                     Step  18    Click on the Colors block from the Blocks palette to open its blocks.
                     Step  19    Drag the red colour block and connect it to the set Canvas1.PaintColor block.

                                   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.

                                                                                         The MIT App Inventor interface
                                                                                         supports  over  21 languages,
                                                                                         making it accessible 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.

                                                                                                                      83
                                                                                               Touch to Motion with MIT

| 80 81 82 83 84 85 86 87 88 89 90 |