12 Replies Latest reply on Mar 8, 2011 12:12 PM by Flex harUI

    Closing FLEX current application using AS

    capitainequebec Level 1

      I use the following code to close the current application using Action Script and JavaScript:


      var urlString:String = "javascript:window.opener = self; self.close();";

      var request:URLRequest = new URLRequest(urlString);

      navigateToURL(request, "_self");


      Then I got the message: SecurityError: Error #2121: Security sandbox violation: navigateToURL


      Is there a way to solve the problem or should I use another way to close the current application from AS.