Skip to main content
sivacse24rep
Inspiring
June 23, 2015
Question

issue on loaderInfo.url

  • June 23, 2015
  • 0 replies
  • 208 views

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

This topic has been closed for replies.