SWF loads an XML to another server = BUG

  • sylvainhugues
  • Born
  • Born
  • No Avatar
  • Joined: Sep 12, 2009
  • Posts: 1
  • Status: Offline

Post September 19th, 2009, 12:49 pm

Attachments:
_CROSS_DOMAIN_EXEMPLE.zip

(22.28 KiB) Downloaded 212 times

Hi fellaz AS3
Hi fellaz AS3,
Hello tribe AS3

All my sources available here: http://wwwPOINTtapiocadesignPOINTcom/pr ... XEMPLE.zip

MY GOAL:
from a flash (swf) on server A, I want a download XML residing on Server B.

MY PROBLEM: it does not work
1 - jutilise Class URLLoader
2 - I declare my Dexue domain names ok with Security. allowDomain () method
3 - I've uploaded "crossdomain.xml" (the root server and the file). A file that enables communication between server recommended by Adobe.

By comparison:

LOCAL MARKET (swf and xml files are on the same server):
http://wwwPOINTtapiocadesignPOINTcom/pr ... alXML.html
var request: URLRequest = new URLRequest ( "XML_exemple. xml ");

REMOTE DOES NOT WORK (swf on a server, xml on server B):
http://wwwPOINTnullepartPOINTcom/prods/ ... xemple.xml
var request: URLRequest = new URLRequest ( "http://wwwPOINTnullepartPOINTcom/prods/xstrata/_CROSS_DOMAIN_EXEMPLE/XML_exemple.xml");

It's a very important project, I fall down if you found, I am even ready to make a gesture.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 19th, 2009, 12:49 pm

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post September 23rd, 2009, 1:04 am

1. place the file crossdomain.xml in the root folder, in your case:
directly in nullepart.com (htdocs, html, public_html or however it is the root folder), not in another subfolder

2. when allow domains in crossdomain.xml, make sure you allow the domain from which the request comes, in your case the domain which holds the swf, and i think that's
Code: [ Select ]
www.tapiocadesign.com


so it will be something like this:
Code: [ Select ]
<?xml version="1.0"?>
<cross-domain-policy>
    <allow-access-from domain="www.tapiocadesign.com" security="true" />
</cross-domain-policy>
  1. <?xml version="1.0"?>
  2. <cross-domain-policy>
  3.     <allow-access-from domain="www.tapiocadesign.com" security="true" />
  4. </cross-domain-policy>


if still not working, try domain="*" until you figure out how it will work.


3. no more need to allowdomains inside you URLLoader_distantXML.as file, you can remove all those Security.allowDomain

i tested it and it works like this, so please make sure you're following the first 2 steps correctly
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 38 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.