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

  • Home
  • SEARCH
  • 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 284653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:28:36+00:00 2026-05-12T05:28:36+00:00

I have to detect in my flash if the user closes his browser or

  • 0

I have to detect in my flash if the user closes his browser or goes to another page and the flash is not accessible anymore. How do i achieve 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-12T05:28:36+00:00Added an answer on May 12, 2026 at 5:28 am

    ExternalInterfaceUtil.addExternalEventListener(“window.onunload”, handleLogout, “unloadFlex”);

    package
    {
        import flash.external.ExternalInterface;
    
        public class ExternalInterfaceUtil
        {
            public static function addExternalEventListener( qualifiedEventName:String, callback:Function,callBackAlias:String ):void
            {
                // 1. Expose the callback function via the callBackAlias
                ExternalInterface.addCallback( callBackAlias, callback );
                // 2. Build javascript to execute
                var jsExecuteCallBack:String = "document.getElementsByName('"+ExternalInterface.objectID+"')[0]."+callBackAlias+"()";
                var jsBindEvent:String = "function(){"+qualifiedEventName+"= function(){"+jsExecuteCallBack+"};}";
                // 3. Execute the composed javascript to perform the binding of the external event to the specified callBack function
                ExternalInterface.call( jsBindEvent );
            }
        }
    } 
    

    I don’t remember where I got this from, but I’ve used it and it works pretty well. Of course not all browsers are going to cooperate, but it is better than nothing…

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

Sidebar

Related Questions

I have a requirement where I have to detect if the user is not
I have a batch file that will detect if the user has the .Net
I have a page with a 100% width/height flash movie that is overlayed with
Have a flash player that pops out into a separate popup browser window. And
I have a Flash application that is hosted from within a Drupal page. Some
I have a page that consists of two frames: one being a flash app,
I have a Flash application that have to detect the mouse wheel event (MouseEvent.MOUSE_WHEEL),
I'm currently using this to detect if the visitors have flash installed or not
I have a overridden UIGestureRecogniser designed to detect 2 touches, but not necessarily one
I have an iframe with a flash clip inside that's occupying the full window,

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.