I have understood that XML.Load is asynchros and when using XML.onLoad you really don’t know when the code will be executed. Please look at my script here: http://neteject.com/examples/flash.txt (I am running the function LoadAll()) and then look at the output here:
Loading
LoadLangSettings()
LoadLangFile1()
LoadLangFile, id: 42,file: undefined
LoadLangFile2()
LoadLangFile, id: undefined,file: undefined
LoadLangFile1() Success:false
an error occured
Error opening URL “file:///E|/proj/chatproject/2005%2D01%2D06/client/lang/undefined”
LoadLangFile2() Success:false
an error occured
Error opening URL “file:///E|/proj/chatproject/2005%2D01%2D06/client/lang/undefined”
LoadLangSettings() Success:true
As you can see, the function in LoadLangSettings executes later which causes some errors because LoadLanguages (which comes after) needs variables which are created in LoadLangSettings. How can I solve this? A sleep function or what?
thanks / Henrik