简体   繁体   English

从Apache网页上调用SWF时不会加载XML文件

[英]SWF won't load a XML file while being called from a webpage on Apache

I have a swf that I put on my page like this 我有这样的瑞士法郎放在我的页面上

<object width='670' height='580'> 
    <embed src='../flash/galeria.swf' width='670' height='580' /> 
</object> 

There is a XML that it reads and creates some stuff. 有一个XML可以读取并创建一些东西。 The problem is that when I run it on my computer it works fine, but when it runs through the page, it won't load the xml. 问题是,当我在计算机上运行它时,它可以正常工作,但是当它在页面中运行时,它不会加载xml。 The paths are correct, I'm sure of this, because I run it outside of the server (Apache) and it works. 路径是正确的,我确信这是正确的,因为我在服务器(Apache)外部运行了它并且可以正常工作。

PS: The xml only loads outside of the server if I publish the SWF with the option "Local playblack securty" set with " acess local files only". PS:如果我发布SWF并将选项“ Local playblack securty”设置为“仅访问本地文件”,则xml仅在服务器外部加载。 I tried to change it to "acess network only" and it won't work outside of the server, and also not while being called from the page on the server. 我试图将其更改为“仅访问网络”,但它无法在服务器外部运行,也无法在服务器页面上被调用。

I solved the problem. 我解决了问题。 While I launched the SWF from the filesystem, on windows, the relative path was relative to the place where I was running the SWF. 当我从Windows上的文件系统启动SWF时,相对路径相对于我运行SWF的位置。 When I ran it embeded on my webpage, and the page and the SWF where in different directories , but all files that the SWF needed were the same as before, it didn't work. 当我运行它时,它会嵌入到我的网页中,并且该页面和SWF都位于不同的目录中,但是SWF需要的所有文件都与以前相同,因此无法正常工作。 I had to move the files the SWF called to the same directory of the webpage that calls the SWF - only this way it worked. 我不得不将SWF调用的文件移动到调用SWF的网页的同一目录中-仅以此方式起作用。 Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM