Yeah, known issue.  No way to avoid that we know of.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mydarkspoon
Sent: Thursday, June 19, 2008 2:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] SecurityDomain.currentDomain causes weird
loaderInfo.url

 

Hi,
I have swf file loaded into another swf from different domain. The swf
is loaded into the same security domain (SecurityDomain.currentDomain).
Both swf explicitly trust each other's domains so I don't experience
any security violations.

The loading works fine and I'm able to do cross scripting, however, I
experience one strange problem: the loaded swf's url (loaderInfo.url)
turns out to be a concatenation of the loader url + loaded swf url.
For example, I created domains in my hosts file: "loader" and
"content", both are localhost and only meant to simulate cross domains:
When the swf from http://content is loaded into the swf from
http://loader, it traces it's url, which I expected to be:
http://content/FileThatTracesItsUrl.swf
<http://content/FileThatTracesItsUrl.swf> 
However, instead of the above url ,it traces out this exact url:

"http://loader/[[IMPORT]]/content/FileThatTracesItsUrl.swf";

This only happen when the SecurityDomain is set to
SecurityDomain.currentDomain, if the swf is loaded into new
SecurityDomain (by not specifying it, or passing null), the url
resolves to:
http://content/FileThatTracesItsUrl.swf
<http://content/FileThatTracesItsUrl.swf> 
which is just what I expected to happen.

For the mean while, I simply extracted the correct url using
String.substr, nevertheless, I'd be glad to know what's the reason for
this or how this can be avoided.

Thanks in advance,

Almog Kustser.

 

Reply via email to