Packagevegas.events
Classpublic class BasicEvent
InheritanceBasicEvent Inheritance flash.events.Event
SubclassesActionEvent, ArrayEvent, BooleanEvent, CommandEvent, ComponentEvent, DateEvent, DynamicEvent, FontEvent, LocalizationEvent, MediaExpertEvent, ModelObjectEvent, NetServerEvent, NumberEvent, RemotingEvent, SoundEvent, StringEvent, StyleEvent, TweenEntryEvent

BasicEvent is the basical event structure to work with vegas.events.EventDispatcher.

Example

 
  var e:BasicEvent = new BasicEvent(type:String, target, context) ;
  

See also

Event


Public Properties
 PropertyDefined by
  context : *
Returns the optional context of this event.
BasicEvent
  target : Object
Returns the event target.
BasicEvent
  timeStamp : Number
[read-only] Returns the timestamp of the event.
BasicEvent
  type : String
Returns the type of event.
BasicEvent
Public Methods
 MethodDefined by
  
BasicEvent(type:String, target:Object = null, context:Boolean = null, bubbles:Boolean = false, cancelable:Number = false, time:* = 0)
Creates a new BasicEvent instance.
BasicEvent
  
clone():Event
Returns the shallow copy of this event.
BasicEvent
  
dispatch(channel:String = null):void
Dispatch the event with the global event flow.
BasicEvent
  
Returns the optional context of this event.
BasicEvent
  
getTarget():Object
Returns the event target.
BasicEvent
  
getTimeStamp():Number
Returns the timestamp of the event.
BasicEvent
  
getType():String
Returns the type of event.
BasicEvent
  
setContext(context:*):void
Sets the optional context object of this event.
BasicEvent
  
setTarget(target:Object):void
Sets the event target.
BasicEvent
  
setType(type:String):void
Sets the event type of this event.
BasicEvent
  
toString():String
Returns the string representation of this event.
BasicEvent
Protected Methods
 MethodDefined by
  
setTimeStamp(time:Number):void
Sets the timestamp of the event (used this method only in internal in the Event class).
BasicEvent
Property detail
contextproperty
context:*  [read-write]

Returns the optional context of this event.

Implementation
    public function get context():*
    public function set context(value:*):void
targetproperty 
target:Object  [read-write]

Returns the event target.

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

Returns the timestamp of the event.

Implementation
    public function get timeStamp():Number
typeproperty 
type:String  [read-write]

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:Boolean = null, bubbles:Boolean = false, cancelable:Number = false, time:* = 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:Boolean (default = null) — the optional context object of the event.
 
bubbles:Boolean (default = false) — indicates if the event is a bubbling event.
 
cancelable:Number (default = false) — indicates if the event is a cancelable event.
 
time:* (default = 0) — this optional parameter is used in the eden deserialization to copy the timestamp value of this event.
Method detail
clone()method
public override 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.
getContext()method 
public function getContext():*

Returns the optional context of this event.

Returns
* — an object, corresponding the optional context of this event.
getTarget()method 
public function getTarget():Object

Returns the event target.

Returns
Object — the event target.
getTimeStamp()method 
public function getTimeStamp():Number

Returns the timestamp of the event.

Returns
Number — the timestamp of the event.
getType()method 
public function getType():String

Returns the type of event.

Returns
String — the type of event.
setContext()method 
public function setContext(context:*):void

Sets the optional context object of this event.

Parameters
context:*
setTarget()method 
public function setTarget(target:Object):void

Sets the event target.

Parameters
target:Object
setTimeStamp()method 
protected function setTimeStamp(time:Number):void

Sets the timestamp of the event (used this method only in internal in the Event class).

Parameters
time:Number
setType()method 
public function setType(type:String):void

Sets the event type of this event.

Parameters
type:String
toString()method 
public override function toString():String

Returns the string representation of this event.

Returns
String — the string representation of this event.