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

    Closing FLEX current application using AS

    capitainequebec Community Member

      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.