![make a replay button in flash actionscript 3.0 make a replay button in flash actionscript 3.0](https://i.ytimg.com/vi/8V2gP93dfxs/mqdefault.jpg)
So for example, if you were to specify a mouse click event then you would write: MouseEvent.CLICK. Once these elements have been identified, writing the event in code takes on this form: For a mouse roll over, it is written as ROLL_OVER. The constant for a mouse click is written as CLICK. Let's consider the MouseEvent class, a few of the events that fall under this class are: mouse clicks and mouse roll overs (i.e. There's also another class for mouse events, which is written as MouseEvent.Įvent constants are specific names that refer to the events themselves. when the user presses a keyboard key) and key up (i.e. Some events that fall under this class are the key down (i.e. Another example is the keyboard event class, which is written as KeyboardEvent. Some events that fall under this class are the complete, deactivate, and open events.
![make a replay button in flash actionscript 3.0 make a replay button in flash actionscript 3.0](http://foundpixel.com/wp-content/uploads/2018/10/cropped-foundpixel-icon-512-1-270x270.png)
There's an event class, which is also called Event. In ActionScript 3 event handling, events are identified by specifying the event class as well as the event constant.Įvent classes can be thought of as the different groups used to classify different kinds of events. And then after that, let's take a look at what the event source is.Īn event refers to a specific occurrence that happens as your Flash movie runs. We've already introduced the concepts of events and responses in the first part of this lesson, but let's go ahead and take a look at them again with a little more detail.
![make a replay button in flash actionscript 3.0 make a replay button in flash actionscript 3.0](https://i.stack.imgur.com/KsxvB.jpg)
These are: (1) the event, (2) the response, and (3) the event source.
#Make a replay button in flash actionscript 3.0 how to#
In this next part of the Flash AS3 Event Handling tutorial series, we're going take a look at how to write event handling code.Īccording to the Adobe Flash ActionScript 3 documentation, there are 3 important elements that need to be identified when working with event handling in Flash. Part 2: How to create an AS3 event listener Part 1: Introduction to AS3 event handling