Centering a Component using PopUpManager in Flex app.

First step is to import the package needed here..

import mx.managers.PopUpManager;

Now we have to use the methods in the PopUpManager Class.

Using the Property creationComplete call a method as init() and in the method use the following line..as..

PopUpManager.centerPopUp(this);

This will center your Component on  creationComplete of that Component..

The Final Code looks like this..

<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
private function init():void
{
PopUpManager.centerPopUp(this);
}
]]>
</mx:Script>

Using This makes good designning.

Advertisements

2 Responses to Centering a Component using PopUpManager in Flex app.

  1. ehsan says:

    hi

    its good idea ,

    but i would like to read session or cookies values in flex how?

    thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: