Private constructors do not exist in ActionScript 3.0. That's why we need
to use a workaround. Every singleton class in Sandy has a private static variable
called
instance. The
instance variable is given a
reference to an instance of the class the first time the class constructor or
getInstance() is called. If an attempt is made to instantiate the
class a the second time, a
SingletonError will be thrown. Always
use the static method
Class.getInstance() to get an instance of the
class.
public function SingletonError()
All the constructor does is passing the error message string to the
superclass.
ASDoc: Preliminary documentation for the Sandy 3D Engine, version 3.0.1