PDA

View Full Version : PopUpManager centering dynamic text


Bombdogs
03-17-2009, 11:37 AM
Hi all,

I'm using the PopUpManager to create a custom component pop-up. The custom component has some bits & pieces aswell as a dynamic text field bound to a message variable, which I set as follows...

var introPanel:IFlexDisplayObject = PopUpManager.createPopUp(this, MyCustomComponent, true);
MyCustomComponent(introPanel).message = "blah blah blah";

but the PopUpManager is centering the panel before the custom text is set & therefore the panel is appearing lower on the screen than expected. I was expecting that calling centerPopUp method after setting the message would solve my problem...

var introPanel:IFlexDisplayObject = PopUpManager.createPopUp(this, MyCustomComponent, true);
MyCustomComponent(introPanel).message = "blah blah blah";
PopUpManager.centerPopUp(introPanel);

.. but it doesn't, so I'm clearly missing something.

Many thanks for any help,

PMF