An Action is a class that is used to modify an aspect of a particle every frame. Actions may, for example, move the particle of modify its velocity.
Actions are added to all particles created by an emitter by using the emitter's addAction method.
See also
| Method | Defined by | ||
|---|---|---|---|
|
Action()
The constructor creates an Action object.
| Action | ||
|
addedToEmitter(emitter:Emitter):void
The addedToEmitter method is called by the emitter when the Action is added to it
It is called within the emitter's addAction method and need not
be called by the user.
| Action | ||
|
getDefaultPriority():Number
The getDefaultPriority method is used to order the execution of actions.
| Action | ||
|
removedFromEmitter(emitter:Emitter):void
The removedFromEmitter method is called by the emitter when the Action is removed from it
It is called within the emitter's removeAction method and need not
be called by the user.
| Action | ||
|
The update method is used by the emitter to apply the action
to every particle.
| Action | ||
| Action | () | constructor |
public function Action()The constructor creates an Action object. But you shouldn't use it because the Action class is abstract.
| addedToEmitter | () | method |
public function addedToEmitter(emitter:Emitter):voidThe addedToEmitter method is called by the emitter when the Action is added to it It is called within the emitter's addAction method and need not be called by the user.
Parametersemitter:Emitter — The Emitter that the Action was added to.
|
| getDefaultPriority | () | method |
public function getDefaultPriority():NumberThe getDefaultPriority method is used to order the execution of actions. It is called within the emitter's addAction method when the user doesn't manually set a priority. It need not be called directly by the user.
ReturnsNumber |
See also
| removedFromEmitter | () | method |
public function removedFromEmitter(emitter:Emitter):voidThe removedFromEmitter method is called by the emitter when the Action is removed from it It is called within the emitter's removeAction method and need not be called by the user.
Parametersemitter:Emitter — The Emitter that the Action was removed from.
|
| update | () | method |
public function update(emitter:Emitter, particle:Particle, time:Number):voidThe update method is used by the emitter to apply the action to every particle. It is called within the emitter's update loop and need not be called by the user.
Parametersemitter:Emitter — The Emitter that created the particle.
|
|
particle:Particle — The particle to be updated.
|
|
time:Number — The duration of the frame - used for time based updates.
|