<< Chapter < Page Chapter >> Page >

Supplemental material

I recommend that you also study the other lessons in my extensive collection of online programming tutorials. You will find a consolidated index at www.DickBaldwin.com .

General background information

The ActionScript 3.0 Reference for the Adobe Flash Platform is a voluminous document. Understanding ActionScript events on the basisof that document alone can be a daunting task.

There are two entry points into the documentation that can make it somewhat easier to navigate:

The flash.events.Event class

As I understand it, all possible ActionScript events are represented by subclasses of the flash.events.Event class. That class has approximately eighty subclasses, many of which are further extended into additional subclasses.

The flash.events.MouseEvent class

For example, the flash.events.MouseEvent class has eight subclasses, some of which are extended into other subclasses.Therefore, the total number of subclasses of the Event class may be well in excess of one hundred. This means that there may be more than onehundred different types of events being dispatched during the running of an ActionScript program.

Event types and subtypes

An ActionScript class represents a type . Therefore, each subclass of the Event class defines a different type of event. Many subclasses define a large number of subtypes.

For example, the MouseEvent class defines about seventeen subtypes ranging in alphabetical order from CLICK to ROLL_OVER , including MOUSE_MOVE , MOUSE_DOWN , MOUSE_UP , etc.

(For brevity, I will refer to the subtypes as types for the remainder of this document.)

Hundreds of event types and hundreds of object types

Therefore, there are many hundreds of different types of events that can bedispatched in various combinations by hundreds of different types of objects during the running of an ActionScript program.

The DisplayObject class

Objects of some classes (such as Button ) , which are subclasses of the DisplayObject class, can dispatch events as a result of direct user interaction. Forexample, a user can click on a button and cause a click event to be dispatched.

The URLLoader class

Objects of other classes (such as URLLoader ) , which are not subclasses of the DisplayObject class, cannot be caused to dispatch an event as a result of direct userinteraction. (As far as I know, there is no way for a user to interact directly with an object of the URLLoader class.)

However, an object of the URLLoader class can dispatch nine different types of events ranging in alphabetical order from activate to securityError .

The addEventListener methods

The documentation index for Flex Builder 3 lists eight different versions of the addEventListener method in classes plus one that is declared in an interface. Of theeight versions defined in classes, one is defined in the EventDispatcher class. That is the one that I will concentrate on in this lesson.

For the record, however, four of the eight versions are overridden versions of the method that is defined in the EventDispatcher class. The remaining three of the eight are defined in classes that extend the Proxy class, which I will ignore in this lesson.

Questions & Answers

what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
ok
Deng
what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Object-oriented programming (oop) with actionscript. OpenStax CNX. Jun 04, 2010 Download for free at http://cnx.org/content/col11202/1.19
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Object-oriented programming (oop) with actionscript' conversation and receive update notifications?

Ask