简单的flash形式、SWF大小问题、AS3和CS4
我想在 AS3 中使用 CS4 创建一个表单。所以我创建了一个新的 fla,我放置了一个 ComboBox
、一个 InputText
、一个 CheckBox
和一个 Button
。二进制文件 (SWF) 的大小为 42KB(压缩后)。实在是太多了!我想创建一个登陆页面,但 42KB 对于 4 个组件来说太多了。
我需要缩小尺寸,我无法停止使用任何组件。我正在查看库试图删除某些内容,我发现 ComponentShim 是组件代码所在的位置(这就是我的理解)。
我查看了AS3中联系表单的源文件,库中没有ComponentShim。
预先感谢,欢迎任何帮助。
乔纳森.
I want to create a form in AS3, with CS4. So I created a new fla, I dropped a ComboBox
, an InputText
, a CheckBox
and a Button
. The size of the binary (SWF) is 42KB (compressed). It is too much! I want to create 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 at 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果 CS4 UI 组件对您来说太重,那么您将不得不使用其他组件,因为没有办法让它们变得更小。另一种方法是编写自己的轻量级组件或尝试使用 MinimlComps 之类的组件:
http://code.google .com/p/minimalcomps/
否则,如果 42K 对您来说太大了,请重新评估是否需要使用 Flash 来处理网站上的表单。
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.
最后,我使用了这个 库 。
它不是那么好,我需要一些时间才能让它工作,它是在 AS2 中(所以我必须重写一些代码),但是,它是轻量级的。 Flash 的基本组件很少不在 Flash Player 运行时中,如果您想使用 Flash 制作横幅,这会产生很大的开销。
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.