在FB中debug运行时,一般不会报安全沙箱错误。这是因为FB把本地的bin-debug目录加入到了信任目录范围。有时间因为浏览器在运行,或安全配置文件在使用等原因,可能此步添加不能成功,所以有时候在FB中debug,也会看到安全沙箱错误。sban 遇到过这种意外情况,Adobe说这是正常的。(报错内容:*** 安全沙箱冲突 ***
SecurityDomain'file:///E:/Flex4GamePro/FootBallGame1.0/res/swfResource/loginAndregister/login.swf'尝试访问不兼容的内容'file:///E:/Flex4GamePro/FootBallGame1.0/bin-debug/NewLoginPage.html',这属于本地沙箱)
解决方法是,到如下地址添加本地信任目录:
http://www.macromedia.com/support/documentation/cn/flashplayer/help/settings_manager04.html
(原理:通过设置Flash Player Trust directory,将swf文件所在目录放入Flash Player Trust directory中,这样该swf安全沙箱类型Security.sandboxType为localTrusted)