PDA

View Full Version : Flash loads partial XML



Saiaus
June 26th, 2007, 12:20 PM
Hey all,

This is my first time posting and the bunch here seemed very knowledgeable and I've reached a dead-end!

Here is the link for a visual of my issue: http://www.myspace.com/saiaus

I've searched through the forums and found several different answers that were very similar to my problem but not quite close enough. Of course it is the dreaded loadXML issue with Flash. No, I'm not having any problems getting the XML data to load into Flash - at least, part of it. This is where I'm stumped.

I built a slideshow in Flash using images and text from an external .xml file and the fantastic XML Slideshow tutorial here. No sweat, I finally have the Flash file embedded into my page and XML is being referenced correctly. Sort of.

The issue is that flash Flash recognizes the .xml file enough to fill out my dynamic text fields but no enough to actually load the images that are part of the .xml file. The images, .xml, and .swf file have all been uploaded to the same webserver so I don't think that's the problem. I've also edited the loadXML inside the FLA document to be a direct link to the .xml file housed on my server.

I'm not sure what else could be happening. It's almost as if the .swf is loading just enough to capture the first Child of the .xml file but it won't load the image or move forward to another. Any help would be much appreciated. I can provide the ActionScript or .xml if someone would like to take a look at it.

Of course, because the Flash is being embedded into MySpace I'm pretty sure that its not referencing the XML correctly - but it seems to, to a point. At any rate, I'm stumped and was hoping someone could point me in the right direction.

dthought
June 26th, 2007, 10:49 PM
Are you triggering events in Flash based on the XML being fully loaded, or are you trying to access the XML data immediately after it is triggered to load, but has not been marked as fully loaded?

Saiaus
June 26th, 2007, 10:57 PM
I believe it's accessing it as soon as it loads it, as opposed to loading the entire document and THEN running the function.



var xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load('http://curtisrichins.com/xmlgallery/images.xml');

function loadXML(loaded) {
This is the first seven lines of the ActionScript in the .fla file, if that helps. Thanks!

dthought
June 26th, 2007, 11:18 PM
So you're trying to load from curtisrichins.com when viewed on myspace.com? Then you likely have a security sandbox violation. Check out the section on the crossdomain.xml file here:

http://www.adobe.com/devnet/flash/articles/fplayer_security_03.html

I didn't notice a crossdomain.xml file set up on the curtisrichins.com server, hence why I think that may be your issue... but it could be that and something else, so don't get disheartened if it still doesn't work afterwards ;) These things take time and effort to resolve...

Saiaus
June 26th, 2007, 11:21 PM
Hmm, I thought that might be it. Thought I had a workaround but apparently not. At any rate, thanks!