hi all,
I have a model class that contains xml data for a file I am
manipulating. What would be the difference between setting it up as
a singleton and just accessing it via static vars and methods?
myFile.load(<file name='oldName'....);
myFile.setFileName('NewFileName');
with the class containing something like:
package {
public class myFile extends Object {
private static var xml:XML;
public static function load(fileXML:String):void {
...
xml=fileXML;
}
public static function setFileName(fileName:String):void {
[EMAIL PROTECTED] fileName;
}
}
}
This approach works fine, but I haven't used AS3 enough to know if
this is an obvious memory problem. But it seems more logical than
doing:
new myFile();
myFile.getInstance().setFilename()... etc.
Thanks!
Alan
_______________________________________________
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