Does anyone know of any reason not to use an accessor in my singleton instead of a function?
so would this work okay (bearing in mind - as2) class com.publicis.hp.NavData { private static var _instance:Data; public var myVar:String; private function Data() { trace("This class is a singleton to hold data, please use Data.instance"); } public static function get instance():Data { if (!Data._instance) Data._instance = new Data(); return Data._instance; } } rather than using public static function getInstance() The reason i ask is that i would find it neater to use it ie: var myString = Data.instance.myVar; rather than var myString = Data.getInstance().myVar; thanks a _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders