可以使用 MovieClipLoader() 从不同的服务器加载 swf 吗?

发布于 2024-07-06 16:01:44 字数 500 浏览 6 评论 0原文

将文件从媒体托管加载到 swf shell(swf 将 swf 作为资产加载)时遇到一些问题。 Mp3 和图像工作正常,但 swf 永远不会加载。 代码如下:

swfpath = "http://555.55.555.555/vir_dir/swf/N000001.swf ” movie_loader.loadMovie(swfpath, "mc_swfimage");

如果 swfpath 设置为“swf/N00001.swf”,它会加载得很好,如果我将 Firefox 指向上面的 http 链接(此处为 555s 作为占位符),它会在 Firefox 中打开文件。

是出于安全考虑还是 loadMovie 不处理 http 路径?

请注意,如果我使用指向 MP3 的相同内容执行 loadAudio,则效果很好。

Having some issues loading files from media hosting into swf shell (a swf loading swfs as assets). Mp3s and images work fine but a swf never loads. Code is like:

swfpath = "http://555.55.555.555/vir_dir/swf/N000001.swf"
movie_loader.loadMovie(swfpath, "mc_swfimage");

if the swfpath is set to "swf/N00001.swf" it loads fine and if I point firefox towards the http link above (555s as placeholders here) it opens the file in firefox just fine.

Is it some security or does loadMovie not handle http paths?

Note it works fine if I do loadAudio with the same thing pointing to an MP3.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜柠檬 2024-07-13 16:01:44

如果发生任何跨域请求,Flash 将在域的根目录中查找 crossdomain.xml 文件。 例如,如果您从以下位置请求 XML 文件:http://mysubdomain.mydomain.com/fu/bar/

Flash 将检查 crossdomain.xml 文件是否存在于:http: //mysubdomin.mydomain.com/crossdomain.xml

如果您需要从其他位置加载 crossdomain.xml 文件,您可以通过 Security.loadPolicyFile 。 请记住,此跨域的位置会对您拥有的安全访问产生任何影响。

您可能还想阅读Flash Player 10 中的安全更改< /a>.

In the event of any cross-domain request, Flash will look for the crossdomain.xml file at the root of the domain. For example, if you are requesting an XML file from: http://mysubdomain.mydomain.com/fu/bar/

Flash will check if a crossdomain.xml file exist at: http://mysubdomin.mydomain.com/crossdomain.xml

If you ever need to load a crossdomain.xml file from a different location, you can do it via Security.loadPolicyFile . Bear in mind that the location of this crossdomain have any impact on the security access you have.

You may also want to read up on the security changes in Flash Player 10.

鸠书 2024-07-13 16:01:44

您需要在为加载的 SWF 提供服务的服务器上设置 crossdomain.xml 文件。

查看 google 上的前几个链接:

http://www.google.com/search?client=safari&rls=en-us&q=crossdomain.xml&ie=UTF-8&oe=UTF- 8

麦克

You need to have a crossdomain.xml file set up on the server serving the loaded SWF.

Check out the first couple of links on google:

http://www.google.com/search?client=safari&rls=en-us&q=crossdomain.xml&ie=UTF-8&oe=UTF-8

mike

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文