BasicEvent

Kind of class:class
Inherits from:none
Implements:
Known subclasses:
Version:1.0
Author:Francis Bourre
Classpath:com.bourre.events.BasicEvent
File last modified:Wednesday, 31 October 2007, 07:35:29
BasicEvent is the basical event structure to work with EventBroadcaster.

Give basic methods for all event sub classes like :

Extends BasicEvent class to define proper event structure for
our development using Pixlib Event API.
For example, take a look at BooleanEvent which define specific event
structure to retreive Boolean value or com.bourre.transitions.TweenEvent
for a more complex BasicEvent extension case.

Works with EventType class to properly define event name.

Example

var e : BasicEvent = new BasicEvent( MyClass.onSomething, this);

Summary

Constructor

BasicEvent

function BasicEvent (
Constructs a new BasicEvent instance.

Example

var e : BasicEvent = new BasicEvent( MyClass.onSomething, this);
Parameters:
e :
an EventType instance (event name).
oT:
event target.

Instance methods

getTarget

function getTarget (
)
Returns event target (usually event source).

Example

var e : BasicEvent = new BasicEvent( myClass.onSomething, this);
var t = e.getTarget();
Returns:
event target
Specified by:

getType

function getType (
Returns event type (name).

Example

var e : BasicEvent = new BasicEvent( MyClass.onSomething, this);
var t : EventType = e.getType();
Returns:
an EventType instance
Specified by:

setTarget

function setTarget (
) : Void
Defines event target.

Example

var e : BasicEvent = new BasicEvent( myClass.onSomething, null);
e.setTarget(this);
Parameters:
oT:
event target
Specified by:

setType

function setType (
e:EventType) : Void
Defines event type (name).

Example

var e : BasicEvent = new BasicEvent( null, this);
e.setType( MyClass.onSomething );
Parameters:
e:
an EventType instance.
Specified by:

toString

function toString (
) : String
Returns the string representation of this instance.
Returns:
String representation of this instance