AS3 中的安全沙箱 [英] Security Sandbox in AS3

查看:24
本文介绍了AS3 中的安全沙箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是安全沙箱违规,我该如何覆盖?我正在 FlashDevelop 中制作一个项目,今天,它不会加载外部文件,即使它以前是这样.它给出了以下输出:

What is a security sandbox violation, and how do I override it? I'm making a project in FlashDevelop, and today, it will not load external files, even though it had been previously. It gives the following output:

**************** 安全沙箱违规 ********* 连接到file:///C|/Documents%20and%20Settings/Kevin.PC885314341208/Desktop/Import%20.txt/StockData/1.txt停止 - 不允许从file:///C|/Documents%20and%20Settings/Kevin.PC885314341208/Desktop/Import%20.txt/import.swf

************* Security Sandbox Violation ********* Connection to file:///C|/Documents%20and%20Settings/Kevin.PC885314341208/Desktop/Import%20.txt/StockData/1.txt halted - not permitted from file:///C|/Documents%20and%20Settings/Kevin.PC885314341208/Desktop/Import%20.txt/import.swf

我希望这不是一个严重的问题.

I hope this isn't a serious problem.

感谢您的帮助.

推荐答案

您发布的错误消息表明您正在尝试从本地 swf 加载本地文件.可以针对您的场景修复此错误.

The error message you posted shows that you're trying to load a local file from a local swf. This error can be fixed for your scenario.

在 FlashDevelop 中,将使用网络服务"设置为 false(项目属性 -> 编译器选项选项卡).这将阻止您的 swf 访问互联网,但会让您加载本地文件.将其设置为 true 将允许访问 Internet 但不允许访问本地文件.

In FlashDevelop, set "Use Network Services" to false (Project Properties -> Compiler Options tab). This will prevent your swf from accessing the internet but will let you load local files. Setting it to true will allow internet access but not access to local files.

在 Flash 中,该设置位于 Flash 选项卡的发布设置"下.它被称为本地播放安全",设置为仅访问本地文件"或仅访问网络".它与 FlashDevelop 中的设置相同,只是名称不同.

In Flash, the setting is under "Publish Settings", Flash tab. It's called "Local playback security" and the settings are "Access local files only" or "Access network only". It's the same setting as in FlashDevelop, just a different name.

您还可以在发布/编译后使用 Adob​​e 的 free+open 切换 swf 文件的使用网络"标志本地内容更新器.

You can also switch the "Use Network" flag of a swf file after publish/compile by using the Adobe's free+open Local Content Updater.

这篇关于AS3 中的安全沙箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆