作者:-sunnydays | 来源:互联网 | 2023-05-19 18:48
IreallyliketheFlexframework,howeverIroutinelydealwithSWFfilesthatare~500KB.我非常喜欢Fl
I really like the Flex framework, however I routinely deal with SWF files that are ~ 500KB.
我非常喜欢Flex框架,但是我经常处理大约500KB的SWF文件。
I don't know at what point a file considered to be "too big" to be served on the internet, but I would assume that a 500KB download just to use a web application would certainly annoy some users.
我不知道在什么时候文件被认为“太大”无法在互联网上提供,但我认为仅仅使用网络应用程序进行500KB下载肯定会使一些用户烦恼。
Are there any tips or techniques on reducing the size of compiled SWFS?
是否有任何关于减少已编译SWFS大小的技巧或方法?
As a side note, the 500KB SWF file really isn't that big of application...
作为旁注,500KB SWF文件真的不是那么大的应用程序......
4 个解决方案
1
This answer is a little more general than you're probably looking for (it applies to all web apps, whether Flash/Flex-based or HTML/CSS/JS based or whatever), but...
这个答案比您可能正在寻找的更为通用(它适用于所有Web应用程序,无论是基于Flash / Flex还是基于HTML / CSS / JS或其他),但......
It depends a lot on the use case for your application. Is it an application that will be loaded all day and pull in updates as necessary (like Gmail) or is it something that will be launched, used, then closed?
这在很大程度上取决于您的应用程序的用例。它是一个应用程序,将整天加载并根据需要提取更新(如Gmail)或是它将被启动,使用,然后关闭?
If the former, besides reducing resource size, you are probably alright here. It makes more sense to get the downloading all out of the way at once, rather than to expect the user to tolerate delays at every turn.
如果是前者,除了减少资源规模外,你可能还好。将下载全部放在一起更有意义,而不是期望用户在每个转弯处容忍延迟。
If the latter, you should lazy-load as much as possible. In other words, for example, instead of embedding all of the application's graphics into the SWF, load them with URLRequest
s or whatever method necessary when they are needed. A quicker launch will "feel" faster and more than make up for the increased HTTP requests over a short time.
如果是后者,你应该尽可能地延迟加载。换句话说,例如,不是将所有应用程序的图形嵌入到SWF中,而是使用URLRequests或在需要时使用任何必要的方法加载它们。更快的启动将“感觉”更快,并且比在短时间内弥补增加的HTTP请求更多。