
flash.events.Event Maven / Gradle / Ivy
The newest version!
package flash.events;
/**
* The Event class is used as the base class for the creation of Event objects, which are passed as parameters to event listeners when an event occurs.
*
* @author Ka Wing Chin
* @author Thomas Weston
*/
public class Event
{
/**
* The ACTIVATE
constant defines the value of the type property of an activate event object.
*/
public static final String ACTIVATE = "activate";
/**
* The Event.ADDED_TO_STAGE
constant defines the value of the type property of an addedToStage event object.
*/
public static final String ADDED_TO_STAGE = "addedToStage";
/**
* The Event.DEACTIVATE
constant defines the value of the type property of a deactivate event object.
*/
public static final String DEACTIVATE = "deactivate";
/**
* The Event.ENTER_FRAME
constant defines the value of the type property of an enterFrame event object.
*/
public static final String ENTER_FRAME = "enterFrame";
/**
* The Event.REMOVED_FROM_STAGE
constant defines the value of the type property of a removedFromStage event object.
*/
public static final String REMOVED_FROM_STAGE = "removedFromStage";
/**
* The Event.RESIZE
constant defines the value of the type property of a resize event object.
*/
public static final String RESIZE = "resize";
/**
* The Event.SOUND_COMPLETE
constant defines the value of the type property of a soundComplete event object.
*/
public static final String SOUND_COMPLETE = "soundComplete";
/**
* The type of event.
*/
public String type;
/**
* Creates an Event
object to pass as a parameter to event listeners.
*
* @param type The type of event, accessible as Event.type
.
* @param bubbles Determines whether the Event object participates in the bubbling stage of the event flow. The default value is false
.
* @param cancelable Determines whether the Event object can be cancelled. The default values is false
.
*/
public Event(String type, boolean bubbles, boolean cancelable)
{
this.type = type;
}
/**
* Creates an Event
object to pass as a parameter to event listeners.
*
* @param type The type of event, accessible as Event.type
.
* @param bubbles Determines whether the Event> object participates in the bubbling stage of the event flow. The default value is false
.
*/
public Event(String type, boolean bubbles)
{
this(type, bubbles, false);
}
/**
* Creates an Event
object to pass as a parameter to event listeners.
*
* @param type The type of event, accessible as Event.type
.
*/
public Event(String type)
{
this(type, false, false);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy