Packageorg.flintparticles.actions
Classpublic class Action
SubclassesAccelerate, Age, AntiGravity, ApproachNeighbours, BoundingBox, ColorChange, DeathOffStage, DeathSpeed, DeathZone, Explosion, Fade, Friction, GravityWell, Jet, KeyDownAction, LinearDrag, MatchRotateVelocity, MatchVelocity, MinimumDistance, MouseAntiGravity, MouseGravity, Move, MutualGravity, QuadraticDrag, RandomDrift, Rotate, RotateToDirection, RotationalFriction, RotationalLinearDrag, RotationalQuadraticDrag, Scale, SpeedLimit, TargetColor, TargetRotateVelocity, TargetScale, TargetVelocity, TurnAwayFromMouse, TurnTowardsMouse, TurnTowardsPoint, TweenPosition, ZonedAction

The Action class is the abstract base class for all particle actions. Instances of the Action class should not be directly created because the Action class itself simply defines default methods that do nothing. Classes that extend the Action class implement their own functionality for the methods they want to use.

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

org.flintparticles.emitters.Emitter.addAction()


Public Methods
 MethodDefined by
  
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
  
The getDefaultPriority method is used to order the execution of actions.
Action
  
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
  
update(emitter:Emitter, particle:Particle, time:Number):void
The update method is used by the emitter to apply the action to every particle.
Action
Constructor detail
Action()constructor
public function Action()

The constructor creates an Action object. But you shouldn't use it because the Action class is abstract.

Method detail
addedToEmitter()method
public function 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.

Parameters
emitter:Emitter — The Emitter that the Action was added to.
getDefaultPriority()method 
public function getDefaultPriority():Number

The 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.

Returns
Number

See also

removedFromEmitter()method 
public function 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.

Parameters
emitter:Emitter — The Emitter that the Action was removed from.
update()method 
public function update(emitter:Emitter, particle:Particle, time:Number):void

The 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.

Parameters
emitter: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.