开发者

Flex - Source Size vs. Compile Size

Could you explain why a Flash Builder source folder - no larger than 2 MB - compiles into a SWF exceeding 15 MB with debugging turned off (exported release build)?

There is only 1 embedded image at about 93k - no other images. The application is not that complicated, basically calls are made to a MySQL db to display information, as well as store information. I have u开发者_如何学编程sed drop shadows and borders, but all standard to Flash Builder. Some custom classes and one custom skin.

Thank you...

Here is listing of the files: .DS_Store

mx_4.5.1.21328.swz Main.html

playerProductInstall.swf Main.swf > 15 MB

rpc_4.5.1.21328.swz amf_config.ini

services assets

skins charts_4.5.1.21328.swz

spark_4.5.1.21328.swz framework_4.5.1.21328.swz

sparkskins_4.5.1.21328.swz gateway.php

swfobject.js history

textLayout_2.0.0.232.swz


This seems pretty large to me.

When you say "Debugging Turned Off" what does that mean? Did you export a release build? Or did you just press the "play" button to run your code instead of the "Debug" button?

Do you have the Flex Framework linkage type set to RSL (AKA External) or Merge into Code?

Are you using an external libraries (SWC)? A framework, such as RobotLegs or Swiz, could add to the size of the SWF; but will probably not be located in the source folder.


Well, well...thought I'd revisit this since I found the problem - a font in a css file with embed set to 'true'. This font wasn't even being used, so I removed it and the css file completely (not in use either). They probably got inserted way early in the project. Code now hovering around 1 MB and less than that for the export build. Hope this helps someone. Cheers!


Flex is a collection of ActionScript classes and components, so when you build an app based on Flex, some of these classes get embedded into your application.

Something as simple as a <s:Button means that the byte code of spark.components.Button has to be included into your application along with your custom code, it's not part of the runtime.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜