views:

193

answers:

2

Hello,

I want to do a little form in AS3, with CS4. So I create a new fla, I drop a ComboBox, an InputText, a CheckBox and a Button and the size of the binary (SWF) is 42KB (compressed). It is too much! I want to do a landing page and 42KB just for 4 components is too much.

I need to cut the size, I can't stop using any of the components. I was looking the library trying to delete something and I found that the ComponentShim is where the code of the components is (that's what I understand).

I looked the source file of a contact form in AS3, in the library there is no ComponentShim.

Thanks in advance, any help is welcome.

Jonathan.

+2  A: 

If the CS4 UI components are too heavy for your liking then you'll have to use something else as there's no way to make them smaller. The alternative is to write your own lightweight components or try out something like MinimlComps:

http://code.google.com/p/minimalcomps/

Otherwise, if 42K is too much for you, reevaluate the need to use Flash for handling a form on your website.

Matt W
This is for Flex. I'm using CS4 and Flash.
Jonathan Barbero
@Jonathan download the SWC file which is precompiled. Just make sure to add the SWC to the class path (in publish settings/flash/settings)
Allan
MinimlComps is not for Flex. You can do what Allan said or add the source code to your project. They will work differently than the CS4 components, but thats because they are lighter and simpler.
Matt W
A: 

Finally, I used this library .

It's not so great, it takes me some time to get it work, it's in AS2 (so I have to rewrite some code), but, it's lightweight. It's rare that the basic components of flash are not in the flash player runtime, this creates an overhead that is big if you want to do a banner with flash.

Jonathan Barbero