将网站从 Flex 3 转换为 Flex 4 时出错
我正在将 Flex 3 站点移动到 Flex 4,但是当我运行该应用程序时,它尝试从 Adobe 下载 .swz 文件,并给出以下错误:
*** Security Sandbox Violation ***
Connection to http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz halted - not permitted from http://localhost/Fl/CityGIS/main.swf
Error #2048: Security sandbox violation: http://localhost/Fl/CityGIS/main.swf cannot load data from http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz.
Failed to load RSL http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz
Failing over to RSL textLayout_1.1.0.604.swz
以下是尝试从本地主机下载相同的文件。
有没有办法配置 SDK 来获取这些文件,或者我的应用程序的配置有问题?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现只有在使用 -use-network=false 时才遇到这个问题,并且我尝试在本地运行 html,并且 .swf 正在访问本地文件(在 flex security free 文件夹之外)。
我的解决方法是更新 sdks//frameworks/flex-config.xml (在 Flash Builder 目录中),并交换顺序运行时共享路径:例如:
TO:
您必须对其他 5 个左右条目执行此操作。
Adobe 应该认真考虑这一点并解决问题。
希望这有帮助。
干杯
帕米
I found I only had this problem when I using: -use-network=false, and I was attempting to run the html locally and the .swf was accessing locally files (outside the flex security free folders).
My workaround is to update sdks//frameworks/flex-config.xml (in the Flash Builder directory), and swap the order runtime shared paths: for example:
TO:
You'll have to do this for the other 5 or so entries.
Adobe should really look at this, and fix the problem.
Hope this helps.
Cheers
Parmy
我认为问题在于它用于 textLayout SWC 的位置
http://fpdownload.adobe.com/ pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz
重定向到
/pub/swz/flex/4.1.0.15186/textLayout_1.1.0.601.swf
和跨域政策对此并不满意。
我认为这表明您正在使用的 sdk 版本存在问题。您可以进入
sdks//frameworks/flex-config.xml
(在 Flash Builder 目录中)并准确查看运行时共享库路径的配置方式对于textLayout.swc。这就是我对flex_sdk_4.1.0.15186
的看法:我建议尝试切换到最新的 4.1 sdk 并重新编译。
I think the problem is that the location it is using for the textLayout swc
http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/textLayout_1.1.0.604.swz
redirects to
/pub/swz/flex/4.1.0.15186/textLayout_1.1.0.601.swf
and the cross domains policy is not happy about that.
I think this points to an issue with the version of the sdk that you are using. You can go into
sdks/<FRAMEWORK_VERSION>/frameworks/flex-config.xml
(in the Flash Builder directory) and see exactly how the runtime shared library path is configured for textLayout.swc. This is what I have forflex_sdk_4.1.0.15186
:I suggest try switching to the latest 4.1 sdk and recompiling.
嗯 - 通常这是因为您正在访问的站点不包含 crossdomain.xml 文件。不过,我可以从此处下载它。
尝试将其添加到您的编译器选项中: -use-network=false
然后清理并强制构建您的应用程序。
如果这不起作用,只是抓住救命稻草,但是您是否尝试过 手动下载并将其放置在您的项目库空间中?
另外,您确定已更新到 Flex 4.1 吗?
我刚刚检查了我的本地知识库 (evernote),并提到 FireFox 有时会出现缓存问题,重新启动 FF 就帮我解决了一次。
Hmmmm - generally this is because the site you are accessing does not contain a crossdomain.xml file. However I can download it from here.
Try adding this to your compiler options: -use-network=false
Then clean and force build your app.
If that doesn't work, and just grasping for straws, but have you tried to manually download it and place it in your project lib space?
Also, are you sure you are updated to Flex 4.1?
I just checked my local KB (evernote) and mentioned that FireFox sometimes has an issue with caching, and that restarting FF solved it once for me.