I have an AIR App I'm working on and need to load a swf(always from localhost) which will access some methods in it's parent and vice versa. I'm not concerned with opening gaping security holes in a desktop app though. I've been searching all over but keep hitting walls with each implementation out there.
My current setup loads in the swf and it plays but I get a small error from the sandbox since I'm not in the same one as the app. Does anyone know how to get past this error so there is complete freedom opened up between the AIR app and the swf?
* Security Sandbox Violation *
SecurityDomain 'http://localhost/test.swf' tried to access incompatible context 'app:/Test_Player.swf'
public function loadSWF():void {
//var context:LoaderContext = new LoaderContext();
//context.checkPolicyFile = true;
//context.applicationDomain = ApplicationDomain.currentDomain;
//context.securityDomain = SecurityDomain.currentDomain;
var req:URLRequest = new URLRequest(swfURL);
adLoader = new Loader();
videoCanvas.rawChildren.addChild(adLoader);
loader.contentLoaderInfo.addEventListener(Event.INIT, adLoadedHandler, false, 0, true);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError, false, 0, true);
//loader.load(req, context);
loader.load(req);
}