Security sandbox violation on Air file
Hi,
I have a air package called "test_sandBox" -->will be installed under " c:\program files\"
this "test_sandBox" will load another swf from c:\test\samp.swf. on test_sandBox i wont write any other function in feature. If i want to add anything i will add the feature on samp.swf and i will udpate that in c:\test\. So at any cost am not in need to reinstall the air package again. i am not able to update the samp.swf on "c:\program files\" due to some security issue on windows 7. So i decide to update the samp.swf on c:\test\
the "test_sandBox.fla" have the following code
import flash.display.Loader;
init();
var _defaultLoader:Loader;
function init()
{ _defaultLoader=new Loader();
_defaultLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onGameLoadComplete, false, 0, true);
var urlRequest:URLRequest=new URLRequest("C:/digient_casino/samp.swf");
_defaultLoader.load(urlRequest);
}
function onGameLoadComplete(e:Event)
{
mc.addChild(_defaultLoader.content);
var mc1=MovieClip(_defaultLoader.content);
mc1.updatePath("",stage);
}
the samp.fla have following code:
import flash.events.Event;
var stageObject:Object;
function updatePath(path:String,sObj:Object)
{
stageObject=sObj;
}
mc.buttonMode=true;
mc.addEventListener(MouseEvent.CLICK,fullScreen);
function fullScreen(e:Event)
{
stageObject.displayState = StageDisplayState.FULL_SCREEN;
// stage.displayState = StageDisplayState.FULL_SCREEN;
}
Issue:
When i run the "test_sandBox" --> it load the samp.swf and when i press the full screen button on the samp.swf it shows the following error
*** Security Sandbox Violation ***
SecurityDomain 'file:///C:/test/samp.swf' tried to access incompatible context 'app:/test_sandBox.swf'
SecurityError: Error #2070: Security sandbox violation: caller file:///C:/test/samp.swf cannot access Stage owned by app:/test_sandBox.swf.
at flash.display::Stage/get nativeWindow()
at flash.display::Stage/set displayState()
at samp_fla::MainTimeline/fullScreen()
How to solve this issue?
Thanks,
Siva
