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.
Regards,
I have try your code and I got the message:
Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.
at Error$/throwError()
at flash.external::ExternalInterface$/call()
at Maj_Temps_SouthShore_Desktop/keyPressed()[C:\Projets Développement Flex\Maj_Temps_SouthShore_Desktop\src\Maj_Temps_SouthShore_Desktop.mx ml:215]
Regards,
North America
Europe, Middle East and Africa
Asia Pacific