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

Chapter 6. ActionScript for Effects > Understanding Events And Interactivity

Understanding Events And Interactivity

When creating animations and effects in your FLA files, you might want to make parts of your SWF files interactive. This might be as simple as letting a user click buttons on the Stage to navigate to different parts a website, or perhaps you're building a complex game in which users can move characters around and interact with an environment. It might also be draggable scrollbars or menus. However intricate your SWF files become, it is important that you understand how to capture user events, such as button clicks, mouse movements, and key presses. Interactivity typically improves the user experience—the reaction visitors have to your sites.

An event, which is an action that occurs while an SWF file is playing back, is triggered by things happening when the SWF file places. Events could be keyboard input, a sound file finishes playing, external files finish loading, or when you click a button. Events alert you when something happens when the SWF file plays, so you can make something else happen as a result. For example, an event occurs when a movie clip or external file loads, a user clicks a button or moves the mouse, or a playhead reaches a frame. Then, you can use event handlers and listeners to help manage those events. So, when a user clicks a button, you can make the playhead go to a new frame; or you can create a progress bar that increases in size as a file loads.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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