开发者

Flex - how to create a lightbox-style loading?

My application's creationCom开发者_StackOverflow中文版plete="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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜