• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part III: Navigating Timelines and Commu... > Advanced Buttons and User Input

Chapter 4. Advanced Buttons and User Input

Creating graphics and animation in Flash is only half the story. You can then incorporate interactivity via buttons and ActionScript to give the viewer control over those graphics and animations. Interactivity is essential for site navigation and e-commerce interfaces on the Web, as well as for game development, online tutorials, or anything that requires that the viewer make choices.

What makes a movie interactive? Interactivity is the back-and-forth communication between the user and the movie. In a Flash movie, the user might react to something that's going on by moving the pointer, clicking the mouse button, or pressing a particular key on the keyboard. That action may trigger a response from the Flash movie, which in turn prompts the user to do something else. It's the user's reactions to things that happen, or what Flash calls events, that make up interactivity. Flash uses a combination of ActionScript assigned to frames, button instances, and objects to handle these events in statements conveniently known as event handlers.

This chapter first explores button symbols and more advanced applications of buttons. You'll learn how to extend their functionality by creating invisible buttons, tweening button instances, and creating fully animated buttons. You'll tackle the issues involved in creating a more complex button, such as pull-down menu, which includes different mouse events, tracking options, and movie clips. Finally, you'll see how to control user input via the keyboard using key events with button instances and the Key object. In addition to the mouse event and the key event, a third kind of event, the clip event, is important for controlling user interaction. Since clip events are associated with movie clips, they will be discussed in Chapter 5, which focuses on the movie clip and the control of Timelines.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint