tags:

views:

874

answers:

3

When I click the button, it should popup my module, when i click outside it will hide or remove it. This is the code I have:

private var Showup:IFlexDisplayObject; 
Showup = PopUpManager.createPopUp(this, samplemodule, false);
Showup.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE, Removewindow); 

private function Removewindow(e:FlexMouseEvent):void
{
    PopUpManager.removePopUp(Showup);
}

My problem is, in samplemodule I have lot of buttons. When I click any button the corresponding module should load to middle portion.. but it does not load.

Please tell me the mistake or an alternative option!

+1  A: 

Please add

mouseDownOutside="PopUpManager.removePopUp(this)"

tag inside you samplemodule (Popping canvas) main Display object as tag

this will remove the popup when you are moving outside the popup and clicking

thanks and Regards Barney Stimson

Barney Stimson
A: 

Not quite sure what you are having trouble with, the close or the centering of the popup. I think it is the centering. If so, try adding:

    PopUpManager.centerPopUp(Showup);
Jon.Stromer.Galley
A: 

@Barney Stimson

Thanks a lot...

Sankara narayanan