call flex initComplete at a specific time

Posted by dubbeat on Stack Overflow See other posts from Stack Overflow or by dubbeat
Published on 2010-05-31T09:57:51Z Indexed on 2010/05/31 10:03 UTC
Read the original article Hit count: 290

Filed under:
|

Hi,

Below is the overriden on complete function for a preloader in Flex.

private function initComplete(e:Event):void
  {
   //dispatchEvent(new Event(Event.COMPLETE));
   cp.status.text="Configuring... Please Wait";
  }

What I want to do is when the app has finsihed loading I want to change the preloaders text to "configuring". Then I want to go and do a bunch of setup stuff in my code.

Once I've done all the setup I wanted how can I get the Preloader to dispatch its Event.complete from else where in my code?

I tried Application.application.preloader but it comes up null.

So I guess my question really is how to access a preloader from anywhere in my application. Would a better approach be to have all setup classes as members of my preloader class?

© Stack Overflow or respective owner

Related posts about flex

Related posts about preloader