-
XML and flash connection problems
I have a html page on the root containing a flash file which queries the content from an XML file. The flash and xml files are contained within a folder adBanner. For some reason when the page loads the Flash file fails to connect with the XML file to populate the data. If all the files reside on the root it works ok however its not really practical to have them in that file structure.
The weird thing is that when locally previewing, it works ok, its only when its uploaded to the server than problems seem to occur. Any help would be greatly appreciated. BY the way, all the files are on the same webserver.
-
Flashmatics
what path is the flash file calling to load the xml file? and also have u tested it locally within a browser or within the flash testing environment?
-
Ive tested it locally within a browser environment and works fine. Does the XML file have to sit at the same level as the HTM(L) and .swf file? Ive tried changing the onLoad path in flash for the xml adBanner/adBannerContent.xml but the page just hangs or the actionscript initiates without content for the XML file.
Is this a security feature within flash player that prevents reading/displaying from a different path? I know there can be problems if the XML file is on a different server but dont understand why mine isnt working.
Matt
-
Flashmatics
Try setting the xml file path relative to the HTML file, not the swf file and see if that makes a difference. Usually i just keep the swf, html page and xml in the same directory so no issue occurs.
-
Yeah that solution would be simpler but unfortunately the client wanted them to sit neatly in a folder. Ive tried making the paths relative but it doesnt seem to make much difference.
-
Flashmatics
I always find i have to make it relative to the HTML file containg rather than the swf itself.
So for e.g suppose you have a folder called 'FLASH' within the ROOT folder.
Suppose the ROOT folder contains the HTML file and the FLASH folder contains the swf and xml file.
Then the xml will be loaded as follows (even though the swf and xml file are in the same folder):
myXML.load("flash/somefile.xml");
-
Slient, yeah that works fine locally but on uploading to a server the swf doesnt seem to want to connect to the data source.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|