http://curtismorley.com/2008/11/01/actionscript-security-error-2060-security-sandbox-violation/
 
HTH
C




________________________________
From: markflex2007 <[email protected]>
To: [email protected]
Sent: Wed, February 10, 2010 5:15:30 PM
Subject: [flexcoders] Flex call javascript

   
I use the Flex function to call javascript function

<mx:Script>
<![CDATA[
import flash.external. *;

private function callJS():void{
var s:String;
if (ExternalInterface. available) {
var wrapperFunction: String = "jsPrint";
s = ExternalInterface. call(wrapperFunc tion,'a') ;
}
}
]]>
</mx:Script>

But I get following error

SecurityError: Error #2060: Security sandbox violation: 
ExternalInterface caller file:///C:/jsTest/ jsTest.swf cannot access 
file:///C:/jsTest/ index.html.

why this happens,how to fix it.

Thanks

Mark


 


      

Reply via email to