Hi, My singleton is throwing +256 levels of error. Below I will show the code from my class and code from the .fla: //////////////////////////// < DateShaper.as > /////////////////////////////class Sampler{// :: Private Properties ::private static var dsInstance:Sampler; // The master instance of this class // :: Constructor ::public function Sampler(){ getInstance();} // :: Public Methods ::public function getInstance():Sampler{ trace("dsInstance: "+dsInstance); // Implementing Singleton Pattern if(dsInstance == null) // if an instance of the Sampler does not exist { dsInstance = new Sampler(); // create an instance of Sampler and store in class var } return dsInstance; // return class var reference } } //////////////////////////// </ DateShaper.as > ///////////////////////////// ////////////////////////////// < myFile.fla > /////////////////////////////// var mySampler:Sampler = new Sampler(); ////////////////////////////// </ myFile.fla > /////////////////////////////// Can anyone see what I'm doing wrong ? Thanks, Stephen._______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com