| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The
BasicEvent class adds the ability for
developpers to change the
type and the
target of an event after its creation.
Target and type redefinition is usefull when creating
macro objects, which dispatch events, but according to
their children event flow. The macro object may only
change event's type or target of the child event and
then redispatch it to its own liteners. You could take
a look to the QueueLoader class fo a concret
usage of this concept.
protected var _oTarget:Object
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The source object of this event, redefined to provide write access
protected var _sType:String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The type of the event, redefined to provide write access
target:Object [read-write]
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The source object of this event
Implementation
public function get target():Object
public function set target(value:Object):void
type:String [read-write]
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The type of this event
Implementation
public function get type():String
public function set type(value:String):void
public function BasicEvent(type:String, target:Object = null)
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Creates a new BasicEvent event for the
passed-in event type. The target is optional,
if the target is omitted and the event used in combination
with the EventBroadcaster class, the event
target will be set on the event broadcaster source.
Parameters
| type:String — String name of the event
|
| |
| target:Object (default = null) — an object considered as source for this event
|
See also
public override function clone():Event
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Clone the event
Returns
| Event — a clone of the event
|
public function getTarget():Object
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the current source of this event object.
Returns
| Object — object source of this event
|
public function getType():String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the type of this event, which generally correspond
to the name of the called function on the listener.
Returns
| String — the type of this event
|
public function setTarget(oTarget:Object):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Defines the new source object of this event.
Parameters
| oTarget:Object — the new source object of this event
|
public function setType(en:String):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Defines the new event type for this event object.
Parameters
| en:String — the new event name, or event type, as string
|
public override function toString():String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the string representation of this instance.
Returns
| String — the string representation of this instance
|
LowRA API documentation 2008- 2009
Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1
mer. févr. 25 2009, 9:22 AM GMT+01:00