1

I'm trying to access a script on a domain with åäö in the domain name. But flash consistently generates a security error no matter what I do.

The setup is like this:

http://www.domän.se/admin.html (with http://www.domän.se/admin.swf embedded)

is trying to access

http://www.domän.se/script/script.php

Even with a crossdomain file flash generates a security error, because it considers the script to be on a different domain or something.

edit: Apparently it only appears in Firefox. I've tested the same page with identical flash player versions in several browsers and the bug only seems to appear in Firefox.

Alex R.
  • 45
  • 1
  • 6
  • what does the error messages say, they should be rather specific on where from it attempted to load the crossdomain.xml and so on. can you post them maybe? – grapefrukt Mar 25 '11 at 14:52
  • Well the error is in swedish so this is a rough translation: `Error #2044: securityError:. text=Error #2048: Violation of sandbox: http://www.Ã¥vandär.se/Admin.swf can not read in data from script/dataManager.php.` – Alex R. Mar 25 '11 at 16:01
  • are you using a relative url or a absolute one? – grapefrukt Mar 26 '11 at 12:56
  • I'm using a relative URL: `private var _scriptURL:String = "script/dataManager.php"` – Alex R. Mar 26 '11 at 15:09

2 Answers2

1

Try using a relative url in your flash file instead of a absolute one.

SimplyZ
  • 898
  • 2
  • 9
  • 22
  • Nope, flash still sees it as a security violation. (Error #2044) The problem is that it mangles the URL, for example å becomes Ã¥. – Alex R. Mar 25 '11 at 15:40
  • if you are using a relative url then you shouldn't be in the need of using the domain name, and if the folders do use åäö then just change their names. (i would explain this to you in Swedish but for the sake of others i'll be writing in English). – SimplyZ Mar 25 '11 at 17:49
  • I have to use åäö because it's part of the domain name. Also I don't use the full domain name anywhere in my code but flash still uses it when checking for security violations. For some reason in firefox it thinks the root directory where I have my flash files is a different domain than the subdirectory where I have my script. – Alex R. Mar 26 '11 at 10:45
  • This is just a wild guess, but have you tried using different encodings? – SimplyZ Mar 26 '11 at 17:02
  • What encoding settings should I change? – Alex R. Mar 26 '11 at 17:57
  • or... i got an idea. go to some site that makes short urls (i.e dot.tk or tinyurl.com) and create a domain name that points to your domain that doesn't have åäö and use the in you AS3 code – SimplyZ Mar 26 '11 at 20:37
  • Then i'm out of ideas, sorry but can't help you any further. – SimplyZ Mar 27 '11 at 00:26
  • Well thanks for the suggestions. =) I finally managed to solve the problem by hosting most of the content on a different domain. The flash and html files are still on the åäö domain, but the server side stuff is on another domain without the åäö. – Alex R. Mar 27 '11 at 09:29
0

Maybe it is stupid, but have you tried to connect to URL through the IP address directly?

Rob

robertp
  • 3,557
  • 1
  • 20
  • 13