Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6931313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:33:38+00:00 2026-05-27T11:33:38+00:00

I need to close the popup(adobe flex), non modal window if I click on

  • 0

I need to close the popup(adobe flex), non modal window if I click on the parent page of the popup. I have to do the out of focus check and then do some validation before close the popup. So what I was thinking that is there any inbuilt focus check event or do we need to create custom event for that ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:33:39+00:00Added an answer on May 27, 2026 at 11:33 am

    In your popup you need to listen for mouse up event on the popup itself, and the stage. On the popup if you catch a mouse up event, stop it from getting to the stage. Then, if you receive a mouse up event on the stage you will know that it was outside of the popup and can close the popup.

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" creationComplete="onCreationComplete()">
        <mx:Script>
            <![CDATA[
                import mx.managers.PopUpManager;
    
                private function onCreationComplete():void {
                    //listen for MouseUp events on the popup, and the stage
                    this.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
                    stage.addEventListener(MouseEvent.MOUSE_UP, handleStageMouseUp);
                }
    
                private function handleMouseUp(e:MouseEvent):void {
                    //catch any MouseUp events on the popup, 
                    //and prevent them from getting to the stage
                    e.stopPropagation(); //don't let this event get to the stage
                }
    
                private function handleStageMouseUp(e:MouseEvent):void {
                    //if the stage fires a MouseUp event, the mouse event 
                    //came from outside of the popup, so we can close it
                    closePopup();
                }
    
                private function validate():Boolean {
                    //add your validate code here
                    return true;
                }
    
                private function closePopup():void {
                    if ( validate() ) {
                        //clean up event listeners, and close popup
                        stage.removeEventListener(MouseEvent.MOUSE_UP, handleStageMouseUp);
                        PopUpManager.removePopUp(this);
                    }
                }
            ]]>
        </mx:Script>
    </mx:Canvas>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For my web application I need to close the child window whenever the parent
I have gtk.Window and I need to catch closure. I need to close the
I need a popup window to appear to the user but without a parent
I have an Popup(not modal window) which shows textbox, when I start typing in
I have my code as a jsFiddle . i need to close the previous
I need to logout on close page or on close browser ... as usual
I need to know because I have to explicitly close some remote resources that
I'm pretty close to having this figured out and just need the last bit
I know I'm close to figuring this out but need a little help. What
I am wanting to close a browser window if the page title is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.