Security Sandbox violation
- April 19, 2009
- 1 reply
- 12580 views
SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///C:/Users/Maddy/Desktop/flash-java(integration)/flash.swf cannot access file:///C:/Users/Maddy/Desktop/flash-java(integration)/test-page.html.
got this error when i tried to call the java script from flash using ExternalInterface.call
here is the code i used for flash
bt.addEventListener(MouseEvent.CLICK,sen);
function sen(e:MouseEvent):void{
var param1:uint = 3;
var param2:uint = 7;
var result:uint = ExternalInterface.call("addNumbers", param1, param2);
t.text = String(result);
}
and the code used in html :
<script language="JavaScript">
// adds two numbers, and sends the result back to ActionScript
function addNumbers(num1, num2)
{
return (num1 + num2);
}
</script>
i am including the html and flash file.........plz tell me how to correct the error..........
this security error is buzzing me a lot......
