Page 109 - Trackpad_ipro 4.1_Class8
P. 109

Component Blocks: It contains relevant blocks for the components we have added in the
                    Design window.
                     Workspace: It arranges all the blocks for coding in the workspace.
                     Trash: It is used for deleting blocks that are not required.
                     Backpack: It stores the copy of all the blocks even when we exit App Inventor.
                 Making Click Event for Button

                 To make click event for button, follow the given steps:



                   2  Drag and drop When
                   Talking_Me.Click do
                   block on the workspace.







                        1  Click on the
                       Talking_Me button.









                 This is an Event Handler block that will handle what happens when the button on your app is
                 clicked.
                 Program the TextToSpeech Action

                 To program the TextToSpeech action, follow the given steps:


                                                                 3  Drag the block to the Workspace and drop it
                                                                onto the block labeled when Talking_Me.Click.















                                                                             2  Click and hold the call
                       1  Click on the
                                                                            TextToSpeech1.Speak
                      TextToSpeech1                                         message block.
                      block.






                 This block will execute when the button on our app is clicked and make our phone speak.



                                                                                             App Development     107
   104   105   106   107   108   109   110   111   112   113   114