Wednesday, August 30, 2006

Flash XMLConnector

I found an interesting behavior with the Flash XMLConnector. With the XMLConnector, you specify the URL of the xml file. Suppose you specify a full address, ie:
http://nyquist.net/somefile.xml


Then when you're testing you hit your page with the .SWF, such as:
http://nyquist.net/somepage.html


You activate your component and the XML loads as expected. You're good to go, right? Well, not exactly. If your user decides to slip in the "www" ie:
http://www.nyquist.net/somepage.html

The XML will never load!

The way to fix this is when you specify the URL for the XML connector, leave off the "http" and domain name. Just have it access the file off of root, ie:
/somefile.xml