dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: System.allowDomain www prefix

Hybrid View

  1. #1
    Actionscript Developer KigD's Avatar
    Join Date
    Jan 2003
    Location
    georgia
    Posts
    597

    System.allowDomain www prefix

    Okay, I've encountered this in AS2 too. I'm sure others have as well.

    I have DomainA loading an SWF with a loader object from the same DomainA.

    Everything works fine, but if I try loading www.DomainA.com/a.swf from www.DomainA.com/b.swf , it only works (when I publish it) if I'm on www.DomainA.com/b.swf. If I go to DomainA.com/b.swf (without the www), I get a Security error.

    I've tried Security.allowDomain("*") on both SWF's and it doesn't seem to be working.

    Any ideas?

    *Edit: I forgot to say that I have a crossdomain file located on www.DomainA.com/crossdomain.xml that allows * domains.
    Last edited by KigD; 02-24-2008 at 11:41 AM.
    K2xL - My games, tutorials, message boards, and experiments.
    Blog

  2. #2
    Actionscript Developer KigD's Avatar
    Join Date
    Jan 2003
    Location
    georgia
    Posts
    597
    Okay, I figured out a way to handle it using ExternalInterfacer.
    If anyone is interested this is how I did it:

    try
    {
    var url:String = ExternalInterface.call('function(){return location.href}');
    if (url.indexOf("http://www.")>=0)
    {
    SWF_SOURCE = "http://www."+SWF_SOURCE;
    }
    else
    {
    SWF_SOURCE = "http://"+SWF_SOURCE;
    }
    }
    catch(e:Error)
    {
    SWF_SOURCE = "http://"+SWF_SOURCE;
    }
    K2xL - My games, tutorials, message boards, and experiments.
    Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center