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 7555623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:39:25+00:00 2026-05-30T11:39:25+00:00

In my Flex (Flash Builder 4) Air application, I have a spark window ,

  • 0

In my Flex (Flash Builder 4) Air application, I have a spark window , and have set the close=”” event handler (also tried the ‘closing’ event) to a method that pops up an alert confirming if they want to close the window.

This worked fine in my normal browser based app as a TitleWindow, but now that it’s an Air app with a native spark window, it’s not working. I never see the alert dialog, and if I debug trace, it does in fact go in to my close handler method, but visually I can see the window is already gone from the screen.

In an AIR application, how do you add a confirmation dialog for when they click the “x” to close the window?

  • 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-30T11:39:27+00:00Added an answer on May 30, 2026 at 11:39 am

    From the docs it looks like closing would be the one to do it, copied from the docs below:

    closing Event
    Event Object Type: flash.events.Event
    property Event.type = flash.events.Event.CLOSING
    Runtime Versions: AIR 1.0
    Dispatched by this NativeWindow object immediately before the window is to be closed. This event can be canceled to prevent the window from being closed.

    The Event.CLOSING constant defines the value of the type property of a closing event object.
    This event has the following properties:

    Property Value
    bubbles false
    cancelable true; canceling this event object stops the close operation.
    currentTarget The object that is actively processing the Event object with an event listener.
    target The object whose connection is to be closed.

    Taken from:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/NativeWindow.html#event:closing

    It says close does happen after the window is closed but closing should be right before and can be cancelled to stop the window from closing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a Air 2/Flex 4 kiosk application with Flash Builder 4. Currently
In my Adobe Air application I have a change event handler attached to a
when tried to build a AIR application for android using flex builder I did
On my flex (flash builder 4) DataGrid - DataGridColumn , I have set a
In Flash Builder (flex 4) I try to use next code to set selected
I have an application I am attempting to convert from a flex 3 air
How to compile your flex (Flash Builder) application for Iph*ne Using Adobe Flash CS5?
In Flash Builder 4.6 I've created a Flex Mobile AIR Project. Why is there
I have a flex (flash builder 4.6) DataGrid. One of the columns is a
I have been using Flash Builder to build my flex software and I am

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.