| Package | vegas.events |
| Class | public class BasicEvent |
| Inheritance | BasicEvent flash.events.Event |
| Subclasses | ActionEvent, 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
| Property | Defined 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 | ||
| Method | Defined 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 | ||
|
getContext():*
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 | ||
| Method | Defined by | ||
|---|---|---|---|
|
setTimeStamp(time:Number):void
Sets the timestamp of the event (used this method only in internal in the Event class).
| BasicEvent | ||
| context | property |
context:* [read-write]Returns the optional context of this event.
Implementation public function get context():*
public function set context(value:*):void
| target | property |
target:Object [read-write]Returns the event target.
Implementation public function get target():Object
public function set target(value:Object):void
| timeStamp | property |
timeStamp:Number [read-only]Returns the timestamp of the event.
Implementation public function get timeStamp():Number
| type | property |
type:String [read-write]Returns the type of event.
Implementation public function get type():String
public function set type(value:String):void
| 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.
|
| clone | () | method |
public override 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.
Parameterschannel:String (default = null) |
See also
| 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():ObjectReturns the event target.
ReturnsObject — the event target.
|
| getTimeStamp | () | method |
public function getTimeStamp():NumberReturns the timestamp of the event.
ReturnsNumber — the timestamp of the event.
|
| getType | () | method |
public function getType():StringReturns the type of event.
ReturnsString — the type of event.
|
| setContext | () | method |
public function setContext(context:*):voidSets the optional context object of this event.
Parameterscontext:* |
| setTarget | () | method |
public function setTarget(target:Object):voidSets the event target.
Parameterstarget:Object |
| setTimeStamp | () | method |
protected function setTimeStamp(time:Number):voidSets the timestamp of the event (used this method only in internal in the Event class).
Parameterstime:Number |
| setType | () | method |
public function setType(type:String):voidSets the event type of this event.
Parameterstype:String |
| toString | () | method |
public override function toString():StringReturns the string representation of this event.
ReturnsString — the string representation of this event.
|