Copy link to clipboard
Copied
I am facing issue with the value returns for 'loaderInfo.url' when parent is called from http and child is called from https. This issue happens when the parent loadercontext is SecurityDomain.currentDomain.
Code on parent.swf
var a:Loader=new Loader();
a.contentLoaderInfo.addEventListener(Event.COMPLETE,adNow);
a.load(new URLRequest("https://xyz.com/child.swf"),new LoaderContext(true,ApplicationDomain.currentDomain,SecurityDomain.currentDomain));
function adNow (e:Event)
{
var c = e.target.content as MovieClip;
addChild(c);;
}
Code on child.swf
Security.allowDomain("*");
Security.allowInsecureDomain("*");
txt.text=LoaderInfo(this.root.loaderInfo).url// just printing the value on text box.
now on the browser http://xyz.com/parent.html(loading parent.swf). parent.swf loading the child.swf (https).
Now the loaderInfo.url returns http://xyz.com/child.swf here comes the issue.
child swf is actually loaded as https but loaderInfo.url shows http location.
How to solve the issue? or is there any other way we can able to find the https child swf's location path?
Note:
This issue occurs only when parent has SecurityDomain.currentDomain in loader context.
Thanks,
Siva
Have something to add?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now