开发者

Embed swf XML path issue

I am trying to embed swf to html, and I'm using SwfObject 2.0 My swf has a xml file with it, the swf are in the same folder with index.html, and the xml file is in a subfolder called xml. So far everythin开发者_如何学JAVAg's fine and working. However, I have another html page that's in a subfoler and wants to load the same swf and xml. This time, the xml didn't load. I've checked the path like a million times, and tried this

<script>
  var flashvars = {};
  flashvars.folderPath = "../";
</script>

nothing works unless I duplicate the xml folder and put it in the subfolder with the html file. Anyone know how to solve this? Thanks in advance.

Cheers


try using direct path in your flash, not relative

I assume the link to your file is looking like file.xml which is a relative way
accessing directly - the link to the xml is something like: /file.xml or /path_to/file.xml (note the slash at the beginning)
this way, wherever you embed your swf, it'll call the xml properly


Unlike CSS, the root path of a Flash movie is the location of the hosting webpage, not the location of the SWF file itself. As Michal says, using a full path to the XML file should resolve this issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜