| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Abstract implementation of Model part of the MVC implementation.
protected var _oEB:EventBroadcaster
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Dedicated Broadcaster for this model.
protected var _owner:Plugin
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Plugin owner.
protected var _sName:String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Model identifier.
public function AbstractModel(owner:Plugin = null, name:String = null)
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Creates instance.
Parameters
| owner:Plugin (default = null) — (optional) Plugin owner.
If null, use NullPlugin
instance.
|
| |
| name:String (default = null) — Model's identifier to register into model locator.
|
public function addEventListener(type:String, listener:Object, ... rest):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Adds an event listener for the specified event type.
There is two behaviors for the addEventListener
function :
- The passed-in listener is an object :
The object is added as listener only for the specified event, the object must
have a function with the same name than
type or at least a
handleEvent function.
- The passed-in listener is a function :
A
Delegate object is created and then
added as listener for the event type. There is no restriction on the name of
the function. If the rest is not empty, all elements in it is
used as additional arguments into the delegate object.
Parameters
| type:String — name of the event for which register the listener
|
| |
| listener:Object — object or function which will receive this event
|
| |
| ... rest — additional arguments for the function listener
|
Returns
| Boolean — true if the function have been succesfully added as
listener fot the passed-in event
|
public function addListener(listener:Object):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Adds the passed-in listener as listener for all events dispatched
by this event broadcaster. The function returns true
if the listener have been added at the end of the call. If the
listener is already registered in this event broadcaster the function
returns false.
Note : The addListener function doesn't accept functions
as listener, functions could only register for a single event.
Parameters
| listener:Object — the listener object to add as global listener
|
Returns
| Boolean — true if the listener have been added during this call
|
protected function getBroadcaster():EventBroadcaster
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns event broadcaster used by model.
Returns
public function getLogger():PluginDebug
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns model logger tunnel.
Returns
public function getName():String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns model identifier.
Returns
public function getOwner():Plugin
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns plugin owner.
Returns
public function notifyChanged(e:Event):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Broadcast the passed-in event object to listeners
according to the event's type. The event is broadcasted
to both listeners registered specifically for this event
type and global listeners in the broadcaster.
If the target property of the passed-in event
is null, it will be set using the value of the
source property of this event broadcaster.
Parameters
| e:Event — event object to broadcast
|
protected function onInitModel():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Broadcasts onInitModel event to listeners.
protected function onReleaseModel():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Broadcasts onReleaseModel event to listeners.
public function release():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Releases model.
- Unregisters model from model locator.
- Dispatched "onReleaseModel" event.
- Removes all event listeners.
public function removeEventListener(type:String, listener:Object):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Removes the passed-in listener for listening the specified event. The
listener could be either an object or a function.
Parameters
| type:String — name of the event for which unregister the listener
|
| |
| listener:Object — object or function to be unregistered
|
Returns
| Boolean — true if the listener have been successfully removed
as listener for the passed-in event
|
public function removeListener(listener:Object):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Removes the passed-in listener object from this event
broadcaster. The object is removed as listener for all
events the broadcaster may dispatch.
Parameters
| listener:Object — the listener object to remove from
this event broadcaster object
|
Returns
| Boolean — true if the object have been successfully
removed from this event broadcaster
|
public function setListenerType(type:Class):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Defines specific event listener type, compliant to
listen this model event broadcaster.
Parameters
public function setName(name:String):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Parameters
public function setOwner(owner:Plugin):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Sets the plugin owner for model.
if owner is null, use NullPlugin
instance.
Parameters
public 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
|
Event object type: com.bourre.events.StringEvent
StringEvent.type property = com.bourre.model.AbstractModel.onInitModelEVENT
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Dispatched when the user presses the Button control.
If the autoRepeat property is true,
this event is dispatched repeatedly as long as the button stays down.
Defines the value of the type property of the event
object for a onInitModel event.
Event object type: com.bourre.events.StringEvent
StringEvent.type property = com.bourre.model.AbstractModel.onReleaseModelEVENT
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Dispatched when the user presses the Button control.
If the autoRepeat property is true,
this event is dispatched repeatedly as long as the button stays down.
public static const onInitModelEVENT:String = "onInitModel"
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Defines the value of the type property of the event
object for a onInitModel event.
public static const onReleaseModelEVENT:String = "onReleaseModel"
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Defines the value of the type property of the event
object for a onInitModel event.
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