This content has been marked as final. Show 4 replies
100kb is 'at least' that a Flex program would take. There is no way around it. you'll need to go to simple Flash app if you don't need all these mx.* classes.
but i do not think that all mx package are necessary, because when i use only the others Tags like Embed, it only include the few required classes like mx.core.FlexBitmap, mx.core.BitmapAsset
if said that Frame Tag required whole mx.core, that reasonable, but why also
mx.effects, mx.control, mx.skin and mx.preloader and much more?
I'm afraid it's a lot more complex than that. When you add MX classes to your project, you are also adding all the skins and other shared librarys associated with them, also there are a lot of helpper classes that are incorporated. All in all that's what weight 100 KB. You'll notice that that number gets bigger as you add more mx classes to your proyect as the extra classes are incorporated.
If you want to make things lighter you should work directly with actionscript and create your own classes, you'll notice that if you make your stuff simpler enough you will be able to get under the 100 kb.
Also if your applicaction is complex enough you can use modules, witch optimize the compilation of classes so you can load the application in smaller pieces and not load the same classes twice making the modules lighter and faster to download.
thankyou for reply
actually i using none of the mx.* classes
it was automatically include by the compiler when i using the metadata tags,
but not much of them, just 2,
[Frame] to create 2 framed swf SWF, so that my preloader can work well
[Embed] to include the pictures(png)
it very strange, and not reasonable to making 2 framed SWF have to include all the mx package. like mx.skin, it totally never will show in my application.
when using only [Embed] tag, it only include few classes that seem really required, they are
may be who know deep into Flex2 compiler core architecture can tell me why [Frame] tag required all those "seem" unnecessary classes to be included.
i try to use the Flex3beta2 compiler, but the still same result are produced.
or is there other way to produce multi frames SWF with flex2 compiler?