Packageflare.animate
Classpublic class Scheduler

Scheduler that oversees animation and time-based processing. Uses an internal timer to regularly invoke the current set of scheduled objects. Typically, interaction with the scheduler is automatically handled by Transition classes. However, custom implmentations of the ISchedulable interface will need to be scheduled. Use the Scheduler.instance property, and not the constructor, to get a reference to the active scheduler.

By default, the Scheduler issues updates to all scheduled items each time the Flash Player advances to the next frame, as reported by the Event.ENTER_FRAME event. To instead set the update interval manually, see the timerInterval property.



Public Properties
 PropertyDefined by
  instance : Scheduler
[static][read-only] The default Scheduler instance.
Scheduler
  timerInterval : Number
Sets the timer interval (in milliseconds) at which the scheduler should process events.
Scheduler
Public Methods
 MethodDefined by
  
Scheduler(lock:Class)
Creates a new Scheduler--this constructor should be not used; instead use the instance property.
Scheduler
  
add(item:ISchedulable):void
Adds an object to the scheduling list.
Scheduler
  
cancel(id:String):Boolean
Cancels any scheduled object with a matching id.
Scheduler
  
isScheduled(id:String):Boolean
Indicates if an object with the given id is currently in the scheduler queue.
Scheduler
  
lookup(id:String):ISchedulable
Looks up the scheduled object indicated by the given id, if any.
Scheduler
  
remove(item:ISchedulable):Boolean
Removes an object from the scheduling list.
Scheduler
  
tick(event:Event):void
Frame/timer callback that invokes each scheduled object.
Scheduler
Property detail
instanceproperty
instance:Scheduler  [read-only]

The default Scheduler instance.

Implementation
    public static function get instance():Scheduler
timerIntervalproperty 
timerInterval:Number  [read-write]

Sets the timer interval (in milliseconds) at which the scheduler should process events. If this value is greater than zero, a Timer instance will be used to trigger scheduler updates at the given interval. If this value is less than or equal to zero (the default), scheduler updates will be issued with each time the Flash Player advances to the next frame according to the Event.ENTER_FRAME event.

Implementation
    public function get timerInterval():Number
    public function set timerInterval(value:Number):void
Constructor detail
Scheduler()constructor
public function Scheduler(lock:Class)

Creates a new Scheduler--this constructor should be not used; instead use the instance property.

Parameters
lock:Class — a lock object to emulate a private constructor
Method detail
add()method
public function add(item:ISchedulable):void

Adds an object to the scheduling list.

Parameters
item:ISchedulable — a schedulable object to add
cancel()method 
public function cancel(id:String):Boolean

Cancels any scheduled object with a matching id.

Parameters
id:String — the id to cancel

Returns
Boolean — true if an object was found and cancelled, false otherwise
isScheduled()method 
public function isScheduled(id:String):Boolean

Indicates if an object with the given id is currently in the scheduler queue.

Parameters
id:String — the id to check for

Returns
Boolean — true if an object with that id is currently scheduled, false otherwise
lookup()method 
public function lookup(id:String):ISchedulable

Looks up the scheduled object indicated by the given id, if any.

Parameters
id:String — the id to lookup

Returns
ISchedulable — the scheduled object with matching id, of null if none
remove()method 
public function remove(item:ISchedulable):Boolean

Removes an object from the scheduling list.

Parameters
item:ISchedulable — the object to remove

Returns
Boolean — true if the object was found and removed, false otherwise
tick()method 
public function tick(event:Event):void

Frame/timer callback that invokes each scheduled object.

Parameters
event:Event — the event that triggered the callback