通过FlexBuilder和mxmlc构建swf的区别(ANT构建)
Flex Builder生成的swf和mxmlc生成的swf有什么区别吗?
在我的应用程序中,有一个页面需要填写某些字段。单击按钮后,它会打开一个弹出窗口。在弹出窗口中选择一个选项并单击“确定”后,它会向服务器发出请求,获取一些数据并将其添加到主页。
当 Flex Builder 生成 swf 时,一切工作正常。但是,当使用 ANT 脚本生成相同的内容时,在从弹出窗口中选择一个值时,我收到错误。
[ResultEvent messageId="8638F71F-BCB8-ACFD-E577-B6F97156374D" type="result" bubbles=false cancelable=true eventPhase=2]
仅当使用 ANT 构建 swf 时才会发生这种情况。
<mxmlc output="$swf_name" file="$mxml_name" allow-source-path-overlap="true" optimize="true">
我正在使用 Cairngorm 框架,并且 SWC 是预先生成的。
<compc output="$swc_name">
最终输出之间也存在大小差异。
从 Flex Builder 生成时,swf 为 802 KB,而使用 ANT 生成时仅为 788 KB。我没有在 Flex Builder 中进行任何配置更改。它使用默认值(我相信这是优化的)来生成 swf。
我对 ANT 脚本做错了什么吗?我是否需要使用任何不同的参数,以便消除仅在使用 mxmlc 构建的 swf 时出现的错误?
请提供您的建议。
Will there be any difference between the swf generated by Flex Builder and mxmlc?
In my application, there is a page with certain fields to be filled in. Upon clicking a button, it opens up a popup. Upon selecting an option in the popup and clicking OK, it makes a request to the server, fetches some data and adds it to the main page.
When the swf is generated by the Flex Builder, everything works just fine. But when the same is generated using an ANT script, upon selecting a value from the popup, I get an error.
[ResultEvent messageId="8638F71F-BCB8-ACFD-E577-B6F97156374D" type="result" bubbles=false cancelable=true eventPhase=2]
This happens only when ANT is used for building the swf.
<mxmlc output="$swf_name" file="$mxml_name" allow-source-path-overlap="true" optimize="true">
I'm using the Cairngorm framework, and the swc is generated before hand.
<compc output="$swc_name">
Also there is a size difference between the final outputs.
The swf is 802 KB when generated from Flex Builder whereas its only 788 KB when generated using ANT. I haven't made any config changes in Flex Builder. It uses the default values(which I believe is optimized) for generating swf.
Am I doing anything wrong with ANT scripts? Do I need to use any different arguments so that I can remove the error which I get only when using the swf built by mxmlc?
Please provide your suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的配置之间可能存在差异;看一下这里 - 这篇 Adobe 知识库文章可能会帮助您确定是否存在,如果存在,它们可能是什么,以便您可以更正它们:
http://kb2.adobe.com/cps/404/kb404341.html
我不太愿意提及第二部分,因为我不经常在两个编译器(我通常坚持使用其中一个),但我可以说我自己之前就注意到了这个问题,而且我记得有一个简短的提及,上个月 Ely Greenfield 在 MAX 上的演讲,讲述了利用 Flex 4 推动实现Flex Builder 的编译器与其对应的 SDK 编译器之间具有同等性——这表明这种同等性目前并不完全存在。因此,虽然我对此没有太多细节,但两者之间似乎确实存在一些差异。
希望我能在这方面提供更多帮助——也许有更多细节的人可以插话。
There could be differences between your configurations; have a look here -- this Adobe KB article might help you determine whether there are, and if so, what they might be so you can correct them:
http://kb2.adobe.com/cps/404/kb404341.html
I hesitate to mention this second part, because I haven't often toggled between the two compilers (I generally stick with one or the other), but I can say that I've noticed this issue before myself, and as I recall there was a brief mention, in Ely Greenfield's talk at MAX this past month, about a push with Flex 4 to achieve parity between Flex Builder's compilers and their SDK counterparts -- suggesting that such parity doesn't quite exist today. So while I don't have much in the way of details on that, it does seem there are some differences between the two.
Wish I could be more helpful on that -- maybe someone with a little more detail could chime in on it.