views:

22

answers:

1

I have the strangest problem I can't seem to figure out.

I have created a simple flash image gallery. Like every other gallery it gets photo information from an XML file. It works fine, I have had no issues working on the flash file locally.

However once I uploaded the .swf and .xml (and all the images) I ran into some trouble. The .swf simply does not read the XML file. I'll lay down what I've done so far, hopefully this will expose my error.

I read XML data by doing the following in ActionScript 2

xml_parser = new XML ();
xml_parser.ignoreWhite = true;
xml_parser.onLoad = xml_loaded;
xml_parser.load ('http://full/path/to/gallery.xml');

My XML file is done up like so

<item>
<title>Photo Title</title>
<info>Here is some info</info>
<picture>http://full/path/to/image.jpg&lt;/picture&gt;
<thumb>http://full/path/to/thumbnail.jpg&lt;/thumb&gt;
</item>

I embed the .swf the old fashion way

<object>
   <param name="movie" value="http://full/path/to/gallery.swf" />
   <embed src="http://full/path/to/gallery.swf" />
</object>

Now when I access the html file that I have embedded the gallery into, I get a lot of undefineds and no pictures. However when I access http://path/to/gallery.swf (standalone swf) it works fine I see all the pictures and their descriptions.

My question is simply WHY IS THIS. How come the .swf doesn't read the XML when it is embedded into a page of html?

I am testing this on Internet Explorer 8

A: 

Download Charles http debugger, you will see what flash is requesting and where it is looking for your xml and assets, its invaluable for this kind of debugging.

Charles downloads

Neil