Packageorg.as3lib.kitchensync.core
Classpublic final class Synchronizer
InheritanceSynchronizer Inheritance flash.events.EventDispatcher

Synchronizer acts as the main time keeper for the animation engine.



Public Properties
 PropertyDefined by
  currentTimestamp : Timestamp
[read-only] Returns the current time as a timestamp object.
Synchronizer
  frameRate : int
[read-only] The frameRate (as defined in the stage)
Synchronizer
  frameRateSeed : DisplayObject
[write-only] Sets the framerate seed for the synchronizer.
Synchronizer
  timerDelay : int
[read-only]
Synchronizer
Public Methods
 MethodDefined by
  
Synchronizer(enforcer:SingletonEnforcer)
Constructor.
Synchronizer
  
[static] Returns an instance to the single instance of the class.
Synchronizer
  
Adds a Syncrhonizer client to the list that will be updated when the dispatchUpdate() method is called.
Synchronizer
  
Removes a Syncrhonizer client from the list.
Synchronizer
Events
 EventSummaryDefined by
    Synchronizer
Property detail
currentTimestampproperty
currentTimestamp:Timestamp  [read-only]

Returns the current time as a timestamp object.

Implementation
    public function get currentTimestamp():Timestamp
frameRateproperty 
frameRate:int  [read-only]

The frameRate (as defined in the stage)

Implementation
    public function get frameRate():int
frameRateSeedproperty 
frameRateSeed:DisplayObject  [write-only]

Sets the framerate seed for the synchronizer.

Implementation
    public function set frameRateSeed(value:DisplayObject):void
timerDelayproperty 
timerDelay:int  [read-only]Implementation
    public function get timerDelay():int
Constructor detail
Synchronizer()constructor
public function Synchronizer(enforcer:SingletonEnforcer)

Constructor. SingletonEnforcer prevents this class from being instantiated without using the initialize() method.

Parameters
enforcer:SingletonEnforcer — - a SingletonEnforcer can only be created internally.
Method detail
getInstance()method
public static function getInstance():Synchronizer

Returns an instance to the single instance of the class.

Returns
Synchronizer — a reference to the only instance of the Synchronizer.
registerClient()method 
public function registerClient(client:ISynchronizerClient):void

Adds a Syncrhonizer client to the list that will be updated when the dispatchUpdate() method is called.

Parameters
client:ISynchronizerClient — The client that will receive the update.
unregisterClient()method 
public function unregisterClient(client:ISynchronizerClient):void

Removes a Syncrhonizer client from the list.

Parameters
client:ISynchronizerClient — The client that will be unregistered.
Event detail
synchronizerUpdateevent 
Event object type: org.as3lib.kitchensync.KitchenSyncEvent