Packagenet.flashpunk.tweens.misc
Classpublic class Alarm
InheritanceAlarm Inheritance Tween Inheritance Object

A simple alarm, useful for timed events, etc.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
If the tween should update.
Tween
 Inheritedcomplete : Function
Tween completion callback.
Tween
 Inheriteddelay : Number = 0
Length of time to wait before starting this tween.
Tween
  duration : Number
[read-only] Current alarm duration.
Alarm
  elapsed : Number
[read-only] How much time has passed since reset.
Alarm
 Inheritedpercent : Number
The completion percentage of the Tween.
Tween
  remaining : Number
[read-only] Time remaining on the alarm.
Alarm
 Inheritedscale : Number
[read-only] The current time scale of the Tween (after easer has been applied).
Tween
Public Methods
 MethodDefined By
  
Alarm(duration:Number, complete:Function = null, type:uint = 0)
Constructor.
Alarm
 Inherited
cancel():void
Immediately stops the Tween and removes it from its Tweener without calling the complete callback.
Tween
  
reset(duration:Number):void
Sets the alarm.
Alarm
 Inherited
start():void
Starts the Tween, or restarts it if it's currently running.
Tween
 Inherited
update():void
Updates the Tween, called by World.
Tween
Public Constants
 ConstantDefined By
 InheritedLOOPING : uint = 1
[static] Looping Tween type, will restart immediately when it finishes.
Tween
 InheritedONESHOT : uint = 2
[static] Oneshot Tween type, will stop and remove itself from its core container when it finishes.
Tween
 InheritedPERSIST : uint = 0
[static] Persistent Tween type, will stop when it finishes.
Tween
Property Detail
durationproperty
duration:Number  [read-only]

Current alarm duration.


Implementation
    public function get duration():Number
elapsedproperty 
elapsed:Number  [read-only]

How much time has passed since reset.


Implementation
    public function get elapsed():Number
remainingproperty 
remaining:Number  [read-only]

Time remaining on the alarm.


Implementation
    public function get remaining():Number
Constructor Detail
Alarm()Constructor
public function Alarm(duration:Number, complete:Function = null, type:uint = 0)

Constructor.

Parameters
duration:Number — Duration of the alarm.
 
complete:Function (default = null) — Optional completion callback.
 
type:uint (default = 0) — Tween type.
Method Detail
reset()method
public function reset(duration:Number):void

Sets the alarm.

Parameters

duration:Number — Duration of the alarm.