Time for action - exit dog

After a scene plays out, we need to give our users a way to play the next scene. We're going to return to the table of contents and allow the user to select the next item. Let's add the controls:

  1. Using the Paint Editor, create a new button with the text Home written on it and position it on the top-left of the stage.
  2. Manually display the Home button by selecting the Home sprite that you just created from the sprites list. Right-click on the sprite and select show.
  3. From the Control palette, drag the when clicked block into the scripts area and select Home from the drop-down list.
  4. Add a broadcast block to the script. Create the following broadcast message: Show TOC.
  5. Clear the Home sprite from the stage by adding the hide block from the Looks palette.
Time for action - exit dog

What just happened?

As we develop the project, we continue to refine how it works. This time, we created a Home button that cleared the dog scene based on a broadcast message.

Have a go hero

Finish the task. Hide the dog sprite and bedroom background based on the Show TOC broadcast message.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.0.249