• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/5

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

5 Cards in this Set

  • Front
  • Back
What is an Event?
They are things that happen while a Flash movie is playing. Example: a visitor clicks a button, presses a key on the keyboard or downloads a file.
What is an Event Handler?
They are the special functions that run when events happen.
function playMovie(event:MouseEvent):void{
}
What is the significance of (event:MouseEvent)
This is how you capture information about what caused the function to run. The event part represents the event that happened, and the colon specifies the data type of this event which is MouseEvent.
How do you attach the event handler function to the event? (e.g. the button click)
You need to use an event listener.
What is an event listener?
An event listener waits for events to happen, and when the events happen, the appropriate event handler function runs.
Simile: Think of a radio station. They broadcast whether you listen or not. Tuning in your radio is like listening for an event. When you hear the music, you choose how to react to it. In the same way your that your selection of a radio station connects you to the signal being broadcst, event listeners connect event handlers to events.

This is the code for adding an event listener:
instanceName.addEventListener(MouseEvent.CLICK, playMovie);