简体   繁体   中英

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. 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. The paths are correct, I'm sure of this, because I run it outside of the server (Apache) and it works.

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". 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. 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. 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. Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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