Packageorg.flintparticles.twoD.actions
Classpublic class WrapAroundBox
InheritanceWrapAroundBox Inheritance ActionBase Inheritance Object

The WrapAroundBox action confines all the particles to a rectangle region. If a particle leaves the rectangle on one side it reenters on the other. This action has a priority of -20, so that it executes after all movement has occured.



Public Properties
 PropertyDefined By
  bottom : Number
The left coordinate of the box.
WrapAroundBox
  left : Number
The left coordinate of the box.
WrapAroundBox
 Inheritedpriority : int
Returns a default priority of 0 for this action.
ActionBase
  right : Number
The left coordinate of the box.
WrapAroundBox
  top : Number
The top coordinate of the box.
WrapAroundBox
Protected Properties
 PropertyDefined By
 Inherited_priority : int = 0
ActionBase
Public Methods
 MethodDefined By
  
WrapAroundBox(left:Number = 0, top:Number = 0, right:Number = 0, bottom:Number = 0)
The constructor creates a WrapAroundBox action for use by an emitter.
WrapAroundBox
 Inherited
addedToEmitter(emitter:Emitter):void
This method does nothing.
ActionBase
 Inherited
This method does nothing.
ActionBase
  
update(emitter:Emitter, particle:Particle, time:Number):void
[override] Tests whether the particle has left the box and, if so, moves it to enter on the other side.
WrapAroundBox
Property Detail
bottomproperty
bottom:Number

The left coordinate of the box.


Implementation
    public function get bottom():Number
    public function set bottom(value:Number):void
leftproperty 
left:Number

The left coordinate of the box.


Implementation
    public function get left():Number
    public function set left(value:Number):void
rightproperty 
right:Number

The left coordinate of the box.


Implementation
    public function get right():Number
    public function set right(value:Number):void
topproperty 
top:Number

The top coordinate of the box.


Implementation
    public function get top():Number
    public function set top(value:Number):void
Constructor Detail
WrapAroundBox()Constructor
public function WrapAroundBox(left:Number = 0, top:Number = 0, right:Number = 0, bottom:Number = 0)

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

Parameters
left:Number (default = 0) — The left coordinate of the box.
 
top:Number (default = 0) — The top coordinate of the box.
 
right:Number (default = 0) — The right coordinate of the box.
 
bottom:Number (default = 0) — The bottom coordinate of the box.

See also

Method Detail
update()method
override public function update(emitter:Emitter, particle:Particle, time:Number):void

Tests whether the particle has left the box and, if so, moves it to enter on the other side.

This method is called by the emitter 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.

See also