You should get an applicationComplete when the app's ready.  It is
available earlier than that, but I don't think there's a good event for
it.  You could check on enterFrame events.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Thursday, March 08, 2007 6:02 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] SWFLoader: WHEN can I access
SystemManager.application["myContent"]?

 

In a handler on the complete event of a SWFLoader, I set an instance
variable(typed as SystemManager)  to myLoader.content.

_smAppLoaded = SystemManager(myLoader.content);

When can I access the .application property?:

Alert.show(_smAppLoaded.application["lblOne"].text);

If I try it in the event handler, I get a null reference.

The same if I try it in a callLater()

But if I try it after a setInterval or timer of 5000 ms, I get a valid
reference.

And from a button in the UI, it is valid.

Is there a good way to know if it is ready?   Or should I just use a
timer loop?

Tracy

 

Reply via email to