I have a Flash Builder application which uses URLs within its code and I want to be able to change these URL values without having to recompile my application, i.e. I want to have a plain text file I can edit which is used to populate these URL values when the application begins. I've worked out what feels like a kludge to do this with ResourceBundles, but maybe there's a better or more straightforward way to go about this.
As an example here's what I have now:
var myUrl = "http://hard.coded.url";
I'd prefer to have the application read a properties file and set the variable accordingly:
var myUrl = getApplicationProperty("myUrl");
How would I go about writing getApplicationProperty()
? Is there a process cooked into ActionScript for this, or do I need to do it myself by opening a text (or XML) file and reading the properties as key/value pairs?
Thanks in advance for any suggestions.