Need to bypass Error #2047: Security sandbox violation: AS3 loading external video swf

StackOverflow https://stackoverflow.com/questions/12192731

  •  29-06-2021
  •  | 
  •  

Question

It´s me again.. I need to go to frame 2 on a AIR2 app but the sandbox deal is driving me crazy...

This is how I load the MovieClikp:

function startLoad()
{
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("http://localhost/Player-More/video/index.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.load(mRequest);
}
function onCompleteHandler(loadEvent:Event)
{
        addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent)
{
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);

}
startLoad();

And this is the actionscript I have in the last frame of the loaded movie:

MovieClip(parent.parent).play();

I never had this problems with AS2 and it's getting worse with every new update Adobe makes.

Sorry about that last comment, but I've tried every solution from other posts and I just can't get it to work.

No correct solution

OTHER TIPS

If you're debugging locally you can add your local path where you're loading up the swf or html that loads the swf from in the flash player settings, right click and go to global settings then click global security settings panel in the links on the left, in the dialog pick your local filesystem location. http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

If you're accessing from one domain to another http://www.domain1.com/a.swf access http://www.domain2.com/b.swf then you have to have a http://www.domain2.com/crossdomain.xml that allows swf 1 to access swf 2.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top