![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
An event is a software or hardware occurrence that requires a response from a Macromedia Flash application. For example, an event such as a mouse click or a keypress is called a user event, since it occurs as a result of direct user interaction. An event generated automatically by Flash Player, such as the initial appearance of a movie clip on the Stage, is called a system event, because it isn't generated directly by the user.
In order for your application to react to events, you must use event handlersActionScript code associated with a particular object and event. For example, when a user clicks a button on the Stage, you might advance the playhead to the next frame. Or when an XML file finishes loading over the network, you might display the contents of that file in a text field.
ActionScript provides a few different ways to handle events: event handler methods, event listeners, and button and movie clip event handlers.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |