0

我一直在尝试使用 flex SDK 4.5.1 编译 flex 项目。

我使用日食 FDT。

我希望我的 flex 应用程序不占用太多空间。

我的所有页面包含 4 个不同的 swf 文件,每个文件都包含整个 flex sdk。我试图通过将 flex sdk 从它们中取出并将其上传到它们的位置来缩小它们。

当我单击我的项目的属性并转到Build Path然后转到时Build Order,我确保所有相关的 swc 文件都在顶部并被标记Use as Runtime Shared Code。当然我说的是 flex sdk swc 文件(spark.swc、mx.swc 等等......)

我还将所有这些 swc 文件复制并上传到我的主 swf 文件所在的同一位置。

当我执行主 swf 文件时。我在打开了firebug的firefox浏览器上执行它,我得到了许多它找不到Application、UIMovieClip等的VerifyError异常。

我认为主 swf 文件根本没有尝试定位 sdk,这就是缺少类的原因。

任何想法如何解决这个问题?

我在下面粘贴了完整的堆栈跟踪、fdt 构建路径和编译器页面。

fdt 构建路径

fdt 编译器

 VerifyError: Error #1014: Class spark.components::Application could not be found.
 VerifyError: Error #1014: Class mx.flash::UIMovieClip could not be found.
 Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class spark.components::Application could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.flash::UIMovieClip could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.core::SpriteAsset could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Warning: Failed to parse corrupt data.
VerifyError: Error #1014: Class mx.resources::ResourceBundle could not be found.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
ReferenceError: Error #1065: Variable _class_embed_css_Assets_swf__553552754_mx_skins_cursor_BusyCursor_617494571 is not defined.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
ReferenceError: Error #1065: Variable buy_coins_component is not defined.

at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
4

1 回答 1

0

我还将所有这些swc文件复制并上传到我的主 swf 文件所在的同一位置

swc文件不能在运行时使用。

如果您在编译期间指定 rsl url,则您的 swf 可以从 adobe 站点(或...可能是 Apache 站点)或其他地方获取 flex rsls。

这些 rsls 应为.swf形式或.swz形式(签名的)。

您可以.swf在 sdk 文件夹中找到 rsls,或者您可以根据需要从中提取它们.swc,但是,当您的 swf 构建时,编译器应将 rsls 放置在输出文件夹中(至少它们总是被填充,bin-debug并且bin-release当使用 构建时Flash Builder,不要知道是否FDT不同)。

您还可以使用Charles查看您的 swf 请求的 url,包括 rsl url。

您可能还希望避免使用指向 adobe/apache 的默认 rsl url,因为它们并不总是可靠的(至少我遇到了问题,我们必须将所有 flex rsl 存储在我们的服务器上)。

于 2013-04-11T10:36:37.710 回答