Packageorg.flintparticles.activities
Classpublic class Activity
SubclassesEmitterImage, FollowMouse, MoveEmitter, RotateEmitter, UpdateOnFrame

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

An Activity is a class that is used to modify the behaviour of the emitter over time. It may, for example, move or rotate the emitter.

Activities are added to the emitter by using its addActivity method.

See also

org.flintparticles.emitters.Emitter.addActivity()


Public Methods
 MethodDefined by
  
The constructor creates an Activity object.
Activity
  
addedToEmitter(emitter:Emitter):void
The addedToEmitter method is called from the emitter when the Activity is added to it It is called within the emitter's addActivity method and need not be called by the user.
Activity
  
The getDefaultPriority method is used to order the execution of activities.
Activity
  
initialize(emitter:Emitter):void
The initialize method is used by the emitter to start the activity.
Activity
  
The removedFromEmitter method is called by the emitter when the Activity is removed from it It is called within the emitter's removeActivity method and need not be called by the user.
Activity
  
update(emitter:Emitter, time:Number):void
The update method is used by the emitter to apply the activity.
Activity
Constructor detail
Activity()constructor
public function Activity()

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

Method detail
addedToEmitter()method
public function addedToEmitter(emitter:Emitter):void

The addedToEmitter method is called from the emitter when the Activity is added to it It is called within the emitter's addActivity method and need not be called by the user.

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

The getDefaultPriority method is used to order the execution of activities. It is called within the emitter's addActivity method when the user doesn't manually set a priority. It need not be called directly by the user.

Returns
Number

See also

initialize()method 
public function initialize(emitter:Emitter):void

The initialize method is used by the emitter to start the activity. It is called within the emitter's start method and need not be called by the user.

Parameters
emitter:Emitter — The Emitter that is using the activity.
removedFromEmitter()method 
public function removedFromEmitter(emitter:Emitter):void

The removedFromEmitter method is called by the emitter when the Activity is removed from it It is called within the emitter's removeActivity method and need not be called by the user.

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

The update method is used by the emitter to apply the activity. It is called within the emitter's update loop and need not be called by the user.

Parameters
emitter:Emitter — The Emitter that is using the activity.
 
time:Number — The duration of the frame - used for time based updates.