Packageorg.flintparticles.common.activities
Classpublic class ActivityBase
InheritanceActivityBase Inheritance Object
Implements Activity
Subclasses FollowDisplayObject, FollowMouse, MoveEmitter, RotateEmitter, UpdateOnFrame

The ActivityBase class is the abstract base class for all emitter activities in the Flint library. It implements the Activity interface with a default priority of zero and empty methods for the rest of the interface.

Instances of the ActivityBase class should not be directly created because the ActivityBase class itself simply implements the Activity interface with default methods that do nothing.

Developers creating custom activities may either extend the ActivityBase class or implement the Activity interface directly. Classes that extend the ActivityBase class need only to implement their own functionality for the methods they want to use, leaving other methods with their default empty implementations.

See also

org.flintparticles.common.emitters.Emitter.addActivity()


Public Properties
 PropertyDefined By
  priority : int
Returns a default priority of 0 for this activity.
ActivityBase
Protected Properties
 PropertyDefined By
  _priority : int = 0
ActivityBase
Public Methods
 MethodDefined By
  
The constructor creates an ActivityBase object.
ActivityBase
  
addedToEmitter(emitter:Emitter):void
This method does nothing.
ActivityBase
  
initialize(emitter:Emitter):void
This method does nothing.
ActivityBase
  
This method does nothing.
ActivityBase
  
update(emitter:Emitter, time:Number):void
This method does nothing.
ActivityBase
Property Detail
_priorityproperty
protected var _priority:int = 0

priorityproperty 
priority:int

Returns a default priority of 0 for this activity. Derived classes override this method if they want a different default priority.


Implementation
    public function get priority():int
    public function set priority(value:int):void

See also

org.flintparticles.common.actions.Activity.getDefaultPriority()
Constructor Detail
ActivityBase()Constructor
public function ActivityBase()

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

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

This method does nothing. Some derived classes override this method to perform actions when the activity is added to an emitter.

Parameters

emitter:Emitter — The Emitter that the Activity was added to.

See also

org.flintparticles.common.actions.Activity.addedToEmitter()
initialize()method 
public function initialize(emitter:Emitter):void

This method does nothing. Derived classes override this method to alter the state of the emitter when it starts.

Parameters

emitter:Emitter — The Emitter.

See also

org.flintparticles.common.actions.Activity.initialize()
removedFromEmitter()method 
public function removedFromEmitter(emitter:Emitter):void

This method does nothing. Some derived classes override this method to perform actions when the activity is removed from the emitter.

Parameters

emitter:Emitter — The Emitter that the Action was removed from.

See also

org.flintparticles.common.actions.Activity.removedFromEmitter()
update()method 
public function update(emitter:Emitter, time:Number):void

This method does nothing. Derived classes override this method to alter the state of the emitter every frame.

Parameters

emitter:Emitter — The Emitter.
 
time:Number — The duration of the frame - used for time based updates.

See also

org.flintparticles.common.actions.Activity.update()