A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Event.COMPLETE not working when domain missing "www"

  1. #1
    Senior Member fantasio's Avatar
    Join Date
    May 2000
    Location
    at the progress bar
    Posts
    409

    Event.COMPLETE not working when domain missing "www"

    hi there,

    i have the following problem:
    i have a swf which is located at
    -> http://www.domain.com/main.swf

    it loads an external file from
    -> http://www.domain.com/external.swf

    everything works
    however if i load the main file from
    ->http://domain.com/main.swf

    the external file gets loaded (ProgressEvent.PROGRESS fires)
    but Event.COMPLETE does not.

    Is this something that only the site admin can fix or a flash security thing?

    thanks

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    You need to listen for all the other errors and events that the loader can throw to determine what the fault is. It's probably a security thing since www.domain.com and domain.com are different domains.

  3. #3
    Senior Member fantasio's Avatar
    Join Date
    May 2000
    Location
    at the progress bar
    Posts
    409
    well it says:
    SecurityError: Error #2121: Security sandbox violation:: LoaderInfo.content: http://domain.com/sites/default/files/flash/main.swf cannot access http://www.domain.com/sites/default/...h/external.swf. This may be worked around by calling Security.allowDomain.
    at flash.display::LoaderInfo/get content()
    at Main/onCompleteHandler()


    so i guess i should be using Security.allowDomain
    however is there another way on the server side perhaps?

  4. #4
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    You may be able to create a crossdomain.xml file on your server granting access to *.domain.com

  5. #5
    Senior Member fantasio's Avatar
    Join Date
    May 2000
    Location
    at the progress bar
    Posts
    409
    ok, i checked.
    i had Security.allowDomain("*.domain.com") in my external swf.
    which did not work...
    i changed it to Security.allowDomain("http://www.domain.com","http://domain.com")
    now it works.

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