add event into the loader in flex 4 air
I would like to开发者_Go百科 know if it's possible to add some jobs on the onload of my air app, what I mean is: I have an eventHandler which get the event "FlexEvent.APPLICATION_COMPLETE" but this event it`s dispatched after the progress bar ends, I would like to know if there is some event that I can handler and add my jobs there?!?
Or the only way to do this, it's doing a custom preloader??, like the link bellow:
Custom Preloader in Flex 4?
Thanks for all!
There are four events that an Application dispatches during its creation and initial display:
preinitialize
initialize
creationComplete
applicationComplete
More info at Adobe: About Startup Order
EDIT:
However, the Application itself is not instantiated until after all the RSL's have loaded, ie., when the Preloader fires an Event.COMPLETE (for that part of the preload). The preinitialize
event on the Application should get fired while the Preloader is still displayed, but the initialization phase might just be much faster relative to the other loading phases. So, yes, if you want to do something concurrent to the Preloader loading RSL's, you have to write a custom preloader.
精彩评论