0
votes

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!

2
I've reworded your question a bit, could you double check I've not accidently altered the meaning? - dbr

2 Answers

2
votes

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.

0
votes

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);