| Package | net.flashpunk.tweens.motion |
| Class | public class CircularMotion |
| Inheritance | CircularMotion Motion Tween Object |
| Property | Defined By | ||
|---|---|---|---|
![]() | active : Boolean
If the tween should update. | Tween | |
| angle : Number [read-only]
The current position on the circle. | CircularMotion | ||
| circumference : Number [read-only]
The circumference of the current circle motion. | CircularMotion | ||
![]() | complete : Function
Tween completion callback. | Tween | |
![]() | delay : Number = 0
Length of time to wait before starting this tween. | Tween | |
![]() | object : Object
Target object for the tween. | Motion | |
![]() | percent : Number
The completion percentage of the Tween. | Tween | |
![]() | scale : Number [read-only]
The current time scale of the Tween (after easer has been applied). | Tween | |
![]() | x : Number
Current x position of the Tween. | Motion | |
![]() | y : Number
Current y position of the Tween. | Motion | |
| Method | Defined By | ||
|---|---|---|---|
CircularMotion(complete:Function = null, type:uint = 0)
Constructor. | CircularMotion | ||
![]() | cancel():void
Immediately stops the Tween and removes it from its Tweener without calling the complete callback. | Tween | |
setMotion(centerX:Number, centerY:Number, radius:Number, angle:Number, clockwise:Boolean, duration:Number, ease:Function = null):void
Starts moving along a circle. | CircularMotion | ||
setMotionSpeed(centerX:Number, centerY:Number, radius:Number, angle:Number, clockwise:Boolean, speed:Number, ease:Function = null):void
Starts moving along a circle at the speed. | CircularMotion | ||
![]() | start():void
Starts the Tween, or restarts it if it's currently running. | Tween | |
![]() | update():void
Updates the Tween, called by World. | Tween | |
| angle | property |
angle:Number [read-only] The current position on the circle.
public function get angle():Number| circumference | property |
circumference:Number [read-only] The circumference of the current circle motion.
public function get circumference():Number| CircularMotion | () | Constructor |
public function CircularMotion(complete:Function = null, type:uint = 0)Constructor.
Parameterscomplete:Function (default = null) — Optional completion callback.
| |
type:uint (default = 0) — Tween type.
|
| setMotion | () | method |
public function setMotion(centerX:Number, centerY:Number, radius:Number, angle:Number, clockwise:Boolean, duration:Number, ease:Function = null):voidStarts moving along a circle.
Parameters
centerX:Number — X position of the circle's center.
| |
centerY:Number — Y position of the circle's center.
| |
radius:Number — Radius of the circle.
| |
angle:Number — Starting position on the circle.
| |
clockwise:Boolean — If the motion is clockwise.
| |
duration:Number — Duration of the movement.
| |
ease:Function (default = null) — Optional easer function.
|
| setMotionSpeed | () | method |
public function setMotionSpeed(centerX:Number, centerY:Number, radius:Number, angle:Number, clockwise:Boolean, speed:Number, ease:Function = null):voidStarts moving along a circle at the speed.
Parameters
centerX:Number — X position of the circle's center.
| |
centerY:Number — Y position of the circle's center.
| |
radius:Number — Radius of the circle.
| |
angle:Number — Starting position on the circle.
| |
clockwise:Boolean — If the motion is clockwise.
| |
speed:Number — Speed of the movement.
| |
ease:Function (default = null) — Optional easer function.
|