3 Replies Latest reply on May 7, 2014 9:35 PM by kglad

    How to trigger a AS function via JS?

    Ron Colmen Level 2

      I need to trigger a AS function when a user close the browser window. This is what I've done so far... but no luck.

       

      AS:

      import flash.external.*;
      function test1() {
      //do something
      }


      JS:

      <script type="text/javascript">  
        window
      .onbeforeunload = function(){
        test1
      ();
        
      return 'text here' };
      </script>