• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

image

PLAY BUTTON

image

PLAY BUTTON

image

Progress

1/5

Click to flip

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);