Table 14.1 shows events associated with buttons, but it is important to note that both the Button and the MovieClip classes of objects support events in frames, as well as in the object actions.
Now that you've seen all the available events for buttons, let's use some of them in the following example:
The preceding code creates several event callbacks to use with the button we created on the stage. Test the movie, and do everything you can to the button. You will notice a series of messages in the Output panel depending on what events you trigger with the button. Figure 14.3 shows some of the messages sent to the Output panel. Figure 14.3. Use callbacks for button events.A button is just one of the objects that can handle events on an independent timeline frame or within the object itself. Another object that can do the same is the movie clip object. |