Skip to main content
Participant
November 22, 2007
Question

Problem loading XML, does thing in the wrong order.

  • November 22, 2007
  • 1 reply
  • 158 views
Hi.
Im completely new to Flash/AS but I have some experience in other programming languages. Im trying to load some external data into my program via the attached code code (somewhat trimmes, but the essentials are there)

What happens when i execute is this:
System1 loadSystemParameters() start
System1 loadSystemParameters() end
vis.fla: 0
System1 loadingComplete() start
Settings: 600
System1 loadingComplete( end)

So the code in the vis.fla is executed to the end before all the data from settings.xml is read and I do not want that. I tried searching and reading about this, but i cannot find the solution. Is there some kind of flag you can set so that the system won´t execute the code after the loadSystemParameters() before all of the function is finished?

Thanks
This topic has been closed for replies.

1 reply

Craig Grummitt
Inspiring
November 23, 2007
if you want to ensure something happens after your xml is loaded, then trigger that something at the end of your complete event handler.

so in your case, put the line:
trace("vis.fla: " + settings.getUpdateInterval());
at the end of your 'loadingComlete' handler - where you have the line:
trace("System1 loadingComplete( end)");