Hi,
I am new to Flex3 so that i don't know much about this.I am facing one problem of Security SandBox error#2070:caller file cannot access stage owned by.Actually i am developing a desktop application with Flex3,AIR, which downloads the swf files,xml files from the server and stores(using"app-storage:/") in application storage.When the user clicks tree menu items in application the related files will be loaded .But the swfs are not loading propery Security sandbox error was coming when clicking to load swfs.
I tried
1.Security.allowDomain("*"),
2.Security.loadPolicyFile(http://172.24.252.59/crossdomain.xml);
3.placed crossdomain.xml file in the server.
4.I createdone cfg file contains c:\Documents and Settings
at the location of Application Data/Macromedia/Flash Player/#Security/FlashPlayerTrust/ Its working fine when i run the application,but after creating and installing the AIR installer getting same problem.
Please help me.
Here is code using for loading swf
public class ExternalSwfLoader extends UIComponent {
private var loader : Loader;
private var visibleAfterLoaded : Boolean;
private var progressHandle : Function;
private var loadSwfComplete : Boolean = false;
public function ExternalSwfLoader(progressHandle:Function = null, visibleAfterLoaded:Boolean = true) {
super();
init(progressHandle, visibleAfterLoaded);
}
protected function init(progressHandle:Function = null, visibleAfterLoaded:Boolean = true) : void {
this.visibleAfterLoaded = visibleAfterLoaded;
this.progressHandle = progressHandle;
//unLoad();
}
public function get content() : DisplayObject {
if (loadSwfComplete) {
return loader.content;
}
return null;
}
public function loadSwf(externalSwfUrl:String, progressHandle:Function = null, visibleAfterLoaded:Boolean = true) : void {
init(progressHandle, visibleAfterLoaded);
var request:URLRequest = new URLRequest(externalSwfUrl);
var ldrContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
loader = new Loader();
addListeners(loader.contentLoaderInfo);
loader.load(request,ldrContext);
if (visibleAfterLoaded) {
addChild(loader);
}
}
Please help me on solving this error.
Thanks in advance.
Vamshi.