-
Security Error issue
Hello,
I made a button into my SWF file. When the use clicked on it, the user will be leadto a web address ( e.g www.google.com). I get this error when I clicked to my button.
SecurityError: Error #2028: Local-with-filesystem SWF file file:///D|/test.swf cannot access Internet URL http://www.google.com.
As I got we should use allowdomain(dom1,dom2,...) method accept other SWF files which are resides into dom1,dom2,..
Whats happen if we want to move user to other web page without any security error or involving user to sandbox setting.
Best,
-
swf's on your hd can't access the web. The exception to this is from within flash if you are testing movie. If you want to access something on a different server use this: Security.loadPolicyFile(url:String)
-
Thank you but I have that peoblem yet.
I created a file and named it crossdomain.xml
In this file I wrote
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="www.google.com" />
<allow-access-from domain="*.google.com" />
</cross-domain-policy>
and in my root AS file wrote:
Security.loadPolicyFile("localhost://crossdomain.xml");
again the problem is remained.
Did I do something wrong?
best,
-
Flash will not access the harddrive or if you have an swf on the hard drive it won't load servers. So first you need to place this on a server. You could install something like xampp if you want to test it on your computer. Then if the url is www.link.com/example/whatever/ All you would need to put is:
Security.loadPolicyFile("www.link.com"); unless you are trying to load the policy file from a certain location.
REMEMBER
if you are trying to do this with the swf on your hard drive then it will not work
Edit: Allow domain is so other swfs can access this swf.
-