Packagesystem.events
Classpublic class BasicEvent
InheritanceBasicEvent Inheritance 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" } ) ;
     



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Protected Methods
 MethodDefined By
  
setTimeStamp(time:uint = 0):void
Sets the timestamp of the event (used this method only in internal in the Event class).
BasicEvent
Property Detail
contextproperty
context:*

Determinates the optional context of this event.


Implementation
    public function get context():*
    public function set context(value:any):void
targetproperty 
target:Object[override]

Indicates the custom event target.


Implementation
    public function get target():Object
    public function set target(value:Object):void
timeStampproperty 
timeStamp:uint  [read-only]

Indicates the timestamp of the event.


Implementation
    public function get timeStamp():uint
typeproperty 
type:String[override]

Returns the type of event.


Implementation
    public function get type():String
    public function set type(value:String):void
Constructor Detail
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.
Method Detail
clone()method
override public function clone():Event

Returns the shallow copy of this event.

Returns
Event — the shallow copy of this event.
dispatch()method 
public function dispatch(channel:String = null):void

Dispatch the event with the global event flow.

Parameters

channel:String (default = null)

See also

static method.
setTimeStamp()method 
protected function setTimeStamp(time:uint = 0):void

Sets 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():String

Returns the string representation of this event.

Returns
String — the string representation of this event.