Singleton Pattern
package { public class Singleton { static var instanceCount:uint = 0; public function Singleton() { instanceCount++; if(instanceCount == 1) { trace("First Singleton class instance"); } else { trace("Singleton class allows only one instance"); } } } }