URLloader error - flex

1

I'm 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 them:

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

Run this application on localhost. I've read a lot about the problem being crossdomain, but it does not seem to be exactly this problem.

Could someone help?

    
asked by anonymous 21.08.2014 / 19:30

1 answer

1

Make sure the Flash Player global settings are like Always enable so that the local file can access external URLs. You can check by clicking here .

Add the value Security.allowDomain("*") at the beginning of your class Main . If it still does not work, test also with Security.allowInsecureDomain("*") . Visit this link for more information on this class.

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

Remove www from your URL and test.

If it still does not work, if possible, put your SWF file in the same request domain.

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

    
22.08.2014 / 14:18