class Singleton { private static var istanza:Singleton = null; private function Singleton ( ) { } public static function getInstance( ):Singleton { if (Singleton.istanza == null) { Singleton.istanza = new Singleton( ); } return Singleton.istanza; } public function helloWorld ( ):Void { trace("Hello World!"); } } class usaSingleton { public function helloWorld(): Void { Singleton.getInstance().helloWorld(); } }