i'm having some really wierd execution order happening at the moment.
Do loadVars.load and xml.load functions execute after everything else? and is there a way that i can pause the script so that the load function can fully execute before the script continues?
i tried setting a boolean on _root called scriptPaused and then an if statement at the start of all functions to see if scriptPaused was true and if not then run the function but that didn't do anything
here is a trace list from it running now
Code:
---------> order 3.0 :: show array list
---------> order 1.0 :: loadMenu
---------> order 2.0 :: setCurrentPage
setCurrentPage.setSection is news
---------> order 1.1 :: loadMenu.XMLVars.onLoad
---------> order 1.2 :: parseNews
loading news.xml
i is 0 // --> from loadMenu()
---------> order 1.3 :: parseText
loading about.txt
i is 1 // --> from loadMenu()
---------> order 1.3 :: parseText
loading how.txt
i is 2 // --> from loadMenu()
>>parsing not yet written <-- will parse something not yet wriiten
---------> order 1.3 :: parseText
loading contact.txt
i is 4 // --> from loadMenu()
---------> order 1.3 :: parseText
loading vacancies.txt
i is 5 // --> from loadMenu()
>>parsing not yet written <-- will parse something not yet wriiten
news content success <-- in the onLoad function of parseNews
text content success <-- in the onLoad function of parseText
text content success <-- in the onLoad function of parseText
text content success <-- in the onLoad function of parseText
text content success <-- in the onLoad function of parseText
i've been told to insert a callback from within the for loop and a pause until the other method finishes before continuing the for-loop but i obviously haven't done that properly
could you tell me what i've done wrong please?