Packageorg.flintparticles.actions
Classpublic class TurnTowardsMouse
InheritanceTurnTowardsMouse Inheritance Action

The TurnTowardsMouse action causes the particle to constantly adjust its direction so that it travels towards the mouse pointer.



Public Properties
 PropertyDefined by
  power : Number
The strength of theturn action.
TurnTowardsMouse
Public Methods
 MethodDefined by
  
TurnTowardsMouse(power:Number)
The constructor creates a TurnTowardsMouse action for use by an emitter.
TurnTowardsMouse
 Inherited
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
 Inherited
The getDefaultPriority method is used to order the execution of actions.
Action
 Inherited
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.
TurnTowardsMouse
Property detail
powerproperty
power:Number  [read-write]

The strength of theturn action. Higher values produce a sharper turn.

Implementation
    public function get power():Number
    public function set power(value:Number):void
Constructor detail
TurnTowardsMouse()constructor
public function TurnTowardsMouse(power:Number)

The constructor creates a TurnTowardsMouse action for use by an emitter. To add a TurnTowardsMouse to all particles created by an emitter, use the emitter's addAction method.

Parameters
power:Number — The strength of the turn action. Higher values produce a sharper turn.

See also

Method detail
update()method
public override 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.