开发者

Difference in building swf through FlexBuilder and mxmlc(ANT build)

开发者 https://www.devze.com 2022-12-10 21:17 出处:网络
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.

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消