-
Senior Member
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
-
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.
-
Senior Member
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?
-
You may be able to create a crossdomain.xml file on your server granting access to *.domain.com
-
Senior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|