1 Reply Latest reply on Feb 21, 2011 8:14 PM by Saumitra Bhave

    StageWebView close event

    BarakHarel

      Hi,

       

      is there a way to catch/listen to a window close event from javascript inside the view? (such as window.close() or self.close()).

      I'm trying to add a simple "share in facebook" button using a StageWebView, which works fine until it needs to close itself (the window, after the user login and actual post, the window should close [facebook is using "self.close()"]).

       

      any thoughts?

        • 1. Re: StageWebView close event
          Saumitra Bhave Level 3

          Hi,

           

          I don't think you get something like close on SWV, But there are many

          solutions to the problems you are facing.

           

          1. Handle the location change event. And check the URL's where you get

          redirected.  And set stage = null whenever you get the appropriate URL.

           

          2. You can use the swc provided by adobe for Facebook. (Google -  Facebook

          for AIR/Flash)

           

          3. You can use HTMLLoader(Desktop Only) and call JS functions inside page.

          (and use JS SDK of Facebook as well as any event handlers you want to listen

          to)

           

          Hope This Helps!!

           

          Thanks,

          Saumitra R. Bhave

          AIR-Linux