简体   繁体   English

完全独立的Flash SWF应用程序是否需要预加载器?

[英]Is a Preloader needed for an fully self-contained Flash SWF application?

So, I'm hoping to get some clarification on a topic that has lots of answers, but I'm trying to determine the right one for my situation. 因此,我希望对具有很多答案的主题进行一些澄清,但是我正在尝试为自己的情况确定合适的主题。

If I'm developing a fully self-contained FLASH CS5.5/6. 如果我要开发一个完全独立的FLASH CS5.5 / 6。 CC application that I'm intending to release to the mobile and web markets... and all the library elements are contained in the single FLA and resulting SWF file. 我打算发布到移动和网络市场的CC应用程序...所有库元素都包含在单个FLA和生成的SWF文件中。

My question is... 我的问题是

Do I need to Pre-load anything with a Pre-Loader or Loader? 是否需要使用预加载器或加载器预加载任何内容? I see a lot of advice for Pre-loader and loaders and they work great, but it appears these are only needing for pulling in SWFs or items outside the confines of the master SWF... but nothing seems to indicate that a pre-loader is necessary for a self-contained SWF. 我看到了很多关于预加载器和加载器的建议,它们的工作效果很好,但看来这些仅用于拉入SWF或超出主SWF范围的项目...但似乎没有任何迹象表明预加载器对于独立的SWF是必需的。

Also, if someone could post some architecture advice and say if there is anything wrong with keeping it self-contained, that would be helpful as well. 另外,如果有人可以发布一些体系结构建议,并说保持独立性是否有错,这也将有所帮助。

Looking forward to gaining some clarity on this subject. 期待在这个问题上得到一些澄清。 I wish the community well. 我希望社区一切顺利。 Thank you! 谢谢!

Best regards, 最好的祝福,

FloridaBoy 佛罗里达男孩

When compiling an SWF with Flash IDE, the resulting file has your assets embedded into the swf. 使用Flash IDE编译SWF时,生成的文件会将您的资产嵌入到swf中。 In this scenario, you don't need a preloader because they're already in memory when your SWF is opened. 在这种情况下,您不需要预加载器,因为打开SWF时它们已经在内存中。 Assets that are not included in you SWF are what require loading, and why preloading data into memory (rather than on-demand) would benefit perceived performance. SWF中不包含的资产是需要加载的资产,以及为什么将数据预加载到内存中(而不是按需)会提高感知的性能。

However, it is naive to believe that because it's all compiled into your SWF that it will bypass the loading time required of external assets. 但是,天真地相信,因为它们都已编译到您的SWF中,所以它将绕过外部资产所需的加载时间。 The application still has to load all your embedded assets into memory, and this typically results in a longer pause at the start of the application as it loads. 应用程序仍然必须将所有嵌入式资产加载到内存中,这通常会导致应用程序在启动时会有更长的暂停时间。

Additionally, the smallest of changes (such as modifying a line of code, or tweaking an image) will require a complete recompile of your SWF. 此外,最小的更改(例如修改代码行或调整图像)将需要对SWF进行完全重新编译。 If you have many assets, and want the freedom of updating these individually, you'll want your assets externalized. 如果您有很多资产,并且希望可以自由地单独更新这些资产,则需要将资产外部化。 This will significantly reduce your compile times, and increase the stability of your FLA file (which can often inexplicably become borked). 这将显着减少您的编译时间,并增加FLA文件的稳定性(通常会莫名其妙地变得乏味)。 In fact, for this reason alone, you might consider doing zero code in Flash IDE, and use external AS files edited in better programs , and relegate the IDE to compile/debug only. 实际上,仅出于这个原因,您可能会考虑在Flash IDE中执行零代码,并使用在更好的 程序中 编辑的外部AS文件,并委托IDE仅进行编译/调试。 Even then, there are great ancillary applications for debugging . 即使这样,仍然有大量的辅助应用程序可用于调试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM