| Package | system.events |
| Class | public class BasicEvent |
| Inheritance | BasicEvent flash.events.Event |
| Subclasses | ActionEvent, ArrayEvent, BooleanEvent, ComponentEvent, DateEvent, DynamicEvent, EntryEvent, FontEvent, FrameLabelEvent, LocalizationEvent, MediaExpertEvent, ModelObjectEvent, NetServerEvent, NumberEvent, SoundEvent, StringEvent, StyleEvent, TweenEntryEvent, ValueEvent |
system.events.BasicEvent is the basical event structure to work with system.events.EventDispatcher.
Example
import system.events.BasicEvent ;
var e:BasicEvent = new BasicEvent( "change" , this , { value:"hello world" } ) ;
| Property | Defined By | ||
|---|---|---|---|
| context : *
Determinates the optional context of this event. | BasicEvent | ||
| target : Object [override]
Indicates the custom event target. | BasicEvent | ||
| timeStamp : uint [read-only]
Indicates the timestamp of the event. | BasicEvent | ||
| type : String [override]
Returns the type of event. | BasicEvent | ||
| Method | Defined By | ||
|---|---|---|---|
BasicEvent(type:String, target:Object = null, context:* = null, bubbles:Boolean = false, cancelable:Boolean = false, time:uint = 0)
Creates a new BasicEvent instance. | BasicEvent | ||
clone():Event [override]
Returns the shallow copy of this event. | BasicEvent | ||
dispatch(channel:String = null):void
Dispatch the event with the global event flow. | BasicEvent | ||
toString():String [override]
Returns the string representation of this event. | BasicEvent | ||
| Method | Defined By | ||
|---|---|---|---|
setTimeStamp(time:uint = 0):void
Sets the timestamp of the event (used this method only in internal in the Event class). | BasicEvent | ||
| context | property |
context:*Determinates the optional context of this event.
public function get context():* public function set context(value:any):void| target | property |
target:Object[override] Indicates the custom event target.
public function get target():Object public function set target(value:Object):void| timeStamp | property |
timeStamp:uint [read-only] Indicates the timestamp of the event.
public function get timeStamp():uint| type | property |
type:String[override] Returns the type of event.
public function get type():String public function set type(value:String):void| BasicEvent | () | Constructor |
public function BasicEvent(type:String, target:Object = null, context:* = null, bubbles:Boolean = false, cancelable:Boolean = false, time:uint = 0)
Creates a new BasicEvent instance.
var e:BasicEvent = new BasicEvent( type:String, [target:Object, [context: [bubbles:Boolean, [cancelable:Boolean, [time:Number]]]]]) ;
Parameters type:String — the string type of the instance.
| |
target:Object (default = null) — the target of the event.
| |
context:* (default = null) — the optional context object of the event.
| |
bubbles:Boolean (default = false) — indicates if the event is a bubbling event.
| |
cancelable:Boolean (default = false) — indicates if the event is a cancelable event.
| |
time:uint (default = 0) — this optional parameter is used in the eden deserialization to copy the timestamp value of this event.
|
| clone | () | method |
override public function clone():EventReturns the shallow copy of this event.
ReturnsEvent — the shallow copy of this event.
|
| dispatch | () | method |
public function dispatch(channel:String = null):voidDispatch the event with the global event flow.
Parameters
channel:String (default = null) |
See also
| setTimeStamp | () | method |
protected function setTimeStamp(time:uint = 0):voidSets the timestamp of the event (used this method only in internal in the Event class).
Parameters
time:uint (default = 0) |
| toString | () | method |
override public function toString():StringReturns the string representation of this event.
ReturnsString — the string representation of this event.
|