My question is very simple: is there a way in flex3 to load the xml file synchronously?
I know how to load asynchronously using a load event. It may or may not be useful. I just want to read the file, analyze it, do what I have to do with it, and continue executing the code.
I have a component that uses an xml file to store some configuration options. I need to read a file when an object is initialized. However, with the event model, I cannot control when the file is uploaded, so I have to write code to “wait” for the code to load. Is it just funny, or is it me? I need a code:
var foo:Foo = new Foo();
foo.doSomething();
I can handle the XML file in the event, and it works fine, but the event is after the method doSomething.
I hope I explained it myself. I think it should be very easy, but it drives me crazy. I do not want to write code to wait for an event if it is really necessary. I feel that all this should be only one line of code!
source
share