When it comes to config files it really depends on the application. I use a xml config file for almost all of my applications. This file is generally stored on the server with the swf in a xml/ or config/ file. I use a Settings Utility to load and parse the files then reference the class for the setting. Here is a link to the class I use (http://flashartofwar.com/?p=21).The hardest part of getting variables into flash from xml is to get them correctly typed. This utility supports typing them and will convert arrays and leave xml data native.The other way of configuring a flash app is through the use of FlashVars in the swfObject that embeds it into the page. Here is an example of the swfObject and to access the variables use this code example.if you use a flashvar called config_xml you can access it inside of the document class like this:var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;var config_xml:String= paramObj.config_xml;Hope that helps.
Post a Comment