|
Flash 8 Cookbook Authors: Lott J. Published year: 2007 Pages: 186-187/336 |
Recipe 12.3. Adding Back and Forward Buttons to a Slide PresentationProblemYou want to add back and forward buttons to a Slide presentation. SolutionAdd two button instances on the top-level slide and add ActionScript to instruct Flash how to respond when the user clicks the buttons. DiscussionThough the Slide presentation adds keyboard navigation by default, it does not add any button-based navigation. You have to add that functionality yourself if you want it, requiring a fairly simple, two-step process:
Adding button instances is something with which you should already be familiar. If it is a new concept to you, review Chapter 9. Essentially, you want to create a back button symbol and a forward button symbol, and then drag instances of each symbol onto the top-level slide. Because you're placing the instances on the top-level slide, they will appear throughout the nested slides. An important thing to keep in mind is that all artwork on the top-level slide will appear below the artwork in the nested slides. Therefore, make sure that the button instances are not going to be hidden by artwork in the nested slides. The next step is to add the appropriate ActionScript, so that Flash knows what to do when the buttons are clicked. Slide presentations in general do not tend to lend themselves to good coding practices, and to further complicate things, the required ActionScript is somewhat convoluted. Fortunately, however, you can apply some of the built-in behaviors from the Behaviors panel in order to have Flash apply the ActionScript for you:
After you've completed these steps, you can test your applicationyou should be able to navigate between the slides using either the keyboard or the buttons you just added.
See AlsoRecipe 12.2 |
Recipe 12.4. Adding Transitions to Slide PresentationsProblemYou want to add transitions (fades, wipes, and so on) to your Slide presentation. SolutionUse the built-in transitions and apply them to the slides. DiscussionFlash Professional includes a set of standard transition effects you can use to determine how slides will animate when appearing and disappearing . You can add these transition effects to your slides using the Behaviors panel. To do so, just complete the following steps:
See AlsoRecipe 12.2 |
|
Flash 8 Cookbook Authors: Lott J. Published year: 2007 Pages: 186-187/336 |