tags:

views:

24

answers:

1

My application's creationComplete="onInit()" has a lot of processing. Therefore I want to mask the entire application with a lightbox-style loading screen while the processing is being handled. The screen should be dark and a loading animation image in the center. After onInit() is completed the loading screen is removed.

My thoughts are to add a UIComponent to the stage, and to remove it at the end of onInit(). I am not sure if this is do-able or is there a better way. Thanks.

+1  A: 

What is the initial processing you need o accomplish? Would it be more effecient to move it into initialize, preinitalize, or even a class constructor, instead of putting it creatonComplete?

That said, there is no reason you can't keep things hidden with the visible property, and swap that after your initialization routine is done. There is also no reason you can't hide items under another component until your processing is done.

www.Flextras.com
@www.Flextras.com I want to load some flv videos, after VideoDisplay components have been created. Can I do this in `initialize` or `preinitialize`?
zihaoyu
Depends how you quantify load. Are you loading in some manner other than specifying the source parameter on a VideoDisplay component? You can set the source parameter at any point during the creation cycle. You can also initialize and start a SWF or URL Loader at any point during the initialization cycle.
www.Flextras.com