Loading swf from a seperate file server

南楼画角 提交于 2019-12-13 04:44:53

问题


I am currently wondering if it is possible to load a swf that is sitting on another file server. I.e. I currently have a custom play bar swf which is embedded on a website (behind the company's firewall) which then loads swf content (currently in the same folder on the website server). The problem I have is bandwidth between remote sites is limited and streaming the swf content from the website server is not an option, however we do have a DFS set up to push all the swf content out to local file servers.

I have tried using a file:// path which works if you create a windows projector file however it doesn't work when embedded onto a website as it seems to try to access via http which the file servers are not set up for.

So is it possible to get the play bar swf to load the swf content sat on a remote file server?


回答1:


Flash doesn't run on the server. It runs in the browser.

Any request for files made by the flash is actually being made by the user's browser. That's why file:// URLs don't work.

If you want to put your file on a seperate server it's still going to have to be accessible from the web (or intranet), and it's still going to be downloaded to the user's browser.

If your users can't directly access the extra swf file, then neither will your flash application.

If a flash application running in a browser could access the server's filesystem that would be a huge security hole, because a malicious user could tinker with your flash application and access the server's filesystem in any way they wanted.




回答2:


I am not that deeply into Flash, but I would guess that access to local file:/// paths is blocked by the browser due to security restrictions, as is the case for normal web pages and JavaScript. I'm quite sure you would have to set up your file servers to serve content through HTTP.



来源:https://stackoverflow.com/questions/1907323/loading-swf-from-a-seperate-file-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!