tags:

views:

834

answers:

2

How can I center popup window in flex 4 ?

I have tried:

PopUpManager.addPopUp(AlertPopUp,DisplayObject(spark.components.Application), true);
PopUpManager.centerPopUp(AlertPopUp);

but it's problem with conversion Application->DisplayObject.

Please help :)

A: 

This link contains an example which works for me. Can you try the same? If its not working for you,post your elaborated code block to check how you have coded.

Umesh
usingDisplayObject(FlexGlobals.topLevelApplication)solve problem :)
rudi888
A: 

PopUpManager.addPopUp(AlertPopUp, FlexGlobals.topLevelApplication as DisplayObject, true); PopUpManager.centerPopUp(AlertPopUp);

Eric Tonussi