Error in Urlloader - flex

Asked

Viewed 60 times

1

I am creating an application in flex (AS3), where I need to get information from an external url. However when using Urlloader the error occurs:

"Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox Violation:"


My code:

sUrlListas = "https://www.us8.api.mailchimp.com/2.0/lists/members.json?apikey=XXXXX&id=XXX; 
urlLoader2 = new URLLoader();

urlLoader2.load(new URLRequest(sUrlListas));

My crossdomain:

<cross-domain-policy>
 <site-control permitted-cross-domain-policies="all" />
 <allow-access-from domain="*" secure="false" to-ports="*"/>    
</cross-domain-policy>

Crossdomain of them:

<cross-domain-policy>
 <allow-access-from domain="*"/>
</cross-domain-policy>

I run this application on localhost. I’ve read a lot about the crossdomain problem, but it doesn’t seem to be exactly this problem.

Could someone help?

1 answer

1

Check if the global settings of Flash Player is as Always allow so that the local file can access external Urls. You can check clicking here.

Add the value Security.allowDomain("*") at the beginning of your class Main. If it still doesn’t work, test also with Security.allowInsecureDomain("*"). Access this link for more information about this class.

It may be that your Flash is not loading the file crossdomain.xml (Which is difficult but not impossible). Also add the value Security.loadPolicyFile("url_do_seu_crossdomain.xml").

Remove the www of your URL and test.

If it still doesn’t work, if possible, put your SWF file in the same domain as the request.

These are some ways to solve this problem, do one thing at a time to check what it really is.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.