Almost always when it works locally but not on the server, then it's a pathing issue. Since neither your .swf or the .xml file are in the same folder as the Web page, pathing is by far the most likely problem. You have to realize that once you place the .swf on a Web page in a different folder than the physical location of the .swf file, you are in effect, removing the .swf from that folder. So now... from the location on the web page... what is the path to the .xml file? The path to the xml needs to be relative to the location on the Web page, not it's physical location.
From an old post:
Pathing issues
Almost always when it works on the local machine and not the server, it's a pathing problem.
You can put your Flash related files in whatever folders you want, they do not have to be in the root. But if sticking them in there worked, then you know that the issue was a pathing problem.
Just remember that paths become relative to the Web page on which those Flash files are used. So for example, if your .swf is in the flash/data folder and you use that .swf on a Web page in the root, you are in effect, removing that .swf from flash/data and putting it in root. So if the .swf is loading any related files (xml, etc), the path used inside the .swf to the .xml file has to be relative to it's new location in root and back down into flash/data. This is true even though when testing the .swf by itself, it can be inside flash/data and work just fine, since relative to it's location, the path is just fine, they are in the same folder. But if that same path is used when the .swf is placed on a page two folder levels up, the relative path has changed, the old "same folder" path will not work.
So just be sure that you use addresses relative to the final locations and you can put the files wherever you want.
Thank you for your answer. I also read the other thread, so I removed temporary the xml file and re-export the swf file. An error report came in looks like this:
Streamfout. URL: file:///C|/Documents%20and%20Settings/test/banner.xml
at net.flashden.flashblue::Main/loadXML()
at net.flashden.flashblue::Main/init()
The question is: Where in the flash file can I change the path to a relative path?
I checked the source code and nowhere seem to written to link to an xml file.
The pathing issue is just one of any number of things that might be causing the problem. It's just a good idea to get the pathing correct and then move on if there are still other issues.
When testing locally have you tested in both IE and FF? The reason I ask is that your <embed> code looks lacking. If you can get it to work in IE that way, fine, but <embed> is normally used just for FF and will not work in IE.
If needed, you could place the Flash on the Web page like this:
Finally it works!! There was also an main.as hidden somewhere which had a URL path written to the XML document. I changed the path and used your object description.
Bookmarks