I want to store some test data for a FlexUnit test in small XML files in my Flex project, and access them trivially for the flex test. How can I load these bits of data synchronously? HTTPService
is the way I'd be loading them _a_synchronously, but adding event handlers to my test cases seems like a bit of overkill.
views:
231answers:
2
A:
To the best of my knowledge, there is no support for synchronous network & file I/O -- all such activity happens on the background thread, and is exposed to the main thread with event handlers.
Christian Nunciato
2009-07-16 18:55:00
I should add that you can always construct workarounds to this, such that your app treats the call synchronously even if the underlying player code doesn't work that way. But chances are doing so would result in a good deal more code than you'd have with just the event handlers alone.
Christian Nunciato
2009-07-16 19:36:58
+1
A:
see this post for a similar sort of thing
http://stackoverflow.com/questions/1164257/load-xml-file-in-flex-before-application-start-intialises
Jon
2009-07-24 21:46:50