快闪视频快影

So you want your Flash Website to load faster? Of course you do!

因此,您希望Flash网站加载速度更快吗? 当然可以!

This article will share a raft of useful techniques that can be implemented to decrease the file size of your Flash movies, and thus have them load faster.

本文将分享大量有用的技术,这些技术可用来减少Flash电影的文件大小,从而使它们加载更快。

This is not intended to be a ‘how-to’ article, but rather, to provide information about what you can do to decrease the size of your Flash movies. Once you’re aware of the available techniques, you can then pursue their implementation yourself.

本文并非旨在作为“入门指南”文章,而是提供有关如何减少Flash电影尺寸的信息。 一旦知道了可用的技术,就可以自己进行实现。

1. Use symbols, animated or otherwise, for every element that appears more than once in your movie.

1.对于动画中出现多次的每个元素,请使用动画或其他符号。

A symbol is a reusable element found in the library of your movie. When you place a symbol on the stage or inside another symbol, you’re working with an instance of that symbol. Unlike using individual graphics, you can use many instances of a given symbol, with almost no addition to the file size of your movie.

符号是在电影库中找到的可重用元素。 当您将符号放置在舞台上或另一个符号内部时,您正在使用该符号的实例。 与使用单个图形不同,可以使用给定符号的许多实例,而几乎不增加影片的文件大小。

Converting all artwork to symbols will ultimately save you bandwidth. Because Flash refers to a singular symbol to generate multiple instances, the user only has to download the graphic once, even if you use it a hundred times in your site.

将所有图稿转换为符号最终将节省您的带宽。 由于Flash引用单个符号来生成多个实例,因此即使您在站点中使用了一百次,用户也只需下载一次即可。

In addition, symbols can save you time and trouble when it comes to making changes to your movie. This is because the changes you make to a symbol are reflected in each instance of that symbol throughout your movie.

此外,在更改电影时,符号可以节省您的时间和麻烦。 这是因为您对符号所做的更改会反映在整个电影中该符号的每个实例中。

2. Use very few — if any — raster graphics.

2.使用很少的栅格图形(如果有)。

Although Flash has no problem allowing you to add raster graphics to your movies, it really isn’t the preferred graphic choice. Flash would be much happier if you used vector graphics.

尽管Flash没问题,可以将光栅图形添加到影片中,但它实际上并不是首选图形选择。 如果使用矢量图形,Flash会更加快乐。

A very brief definition of vector vs. raster graphics for those who are not familiar: vector graphics are simply mathematical definitions of shapes and lines that are used to construct your graphic. Because your graphics are created from numbers and equations, you maintain a completely scalable image. Raster file formats like BMP, JPEG, and GIF, on the other hand, are defined not by mathematics, but by a series of pixels lined up in rows with color values applied to each individual pixel (or dot).

对于不熟悉的人来说,矢量与栅格图形的定义非常简短:矢量图形只是用于构造图形的形状和线的数学定义。 由于您的图形是根据数字和方程式创建的,因此您可以维护一个完全可缩放的图像。 另一方面,光栅文件格式(例如BMP,JPEG和GIF)不是由数学定义的,而是由一系列按行排列的像素定义的,这些像素的颜色值应用于每个像素(或点)。

Because vector graphics are essentially just mathematical equations that, when formulated, produce a graphic they take up very little storage space, and add little to the overall file size of your movie.

因为矢量图形本质上只是数学方程式,公式化后生成的图形它们占用的存储空间很小,并且几乎不增加影片的整体文件大小。

While this may be old news to some, hopefully this information will help the new Flash user avoid making that grave mistake of taking their honed Photoshop skills and trying to drop all those raster graphics into Flash. In short, a nice raster graphic used occasionally is probably ok, just don’t try and build your entire Flash site from raster graphics.

尽管这对于某些人来说可能是个老新闻,但希望这些信息将帮助新的Flash用户避免犯下严重的错误,因为他们需要磨练自己的Photoshop技能,并尝试将所有这些光栅图形放入Flash中。 简而言之,偶尔使用一个不错的栅格图形可能是可以的,只是不要尝试从栅格图形构建整个Flash网站。

3. Change the quality of jpg images.

3.更改jpg图像的质量。

So you totally disregarded the statement above, and went ahead and added that .jpg to your Flash movie? Well, let’s at least trim it down.

因此,您完全无视上述声明,而是继续将.jpg添加到Flash电影中? 好吧,至少让它修剪一下。

Open up your library by hitting CTRL + L, and locate your imported .jpg. Right-click on it and go to properties. Uncheck ‘use imported JPEG data’ and you’ll find that you can adjust the image quality. You will have to play with the quality setting until you find a happy medium of appearance vs. file size. I always adjust this setting — it alone can make a huge difference to your file size.

通过按CTRL + L打开您的库,然后找到导入的.jpg。 右键单击它,然后转到属性。 取消选中“使用导入的JPEG数据”,您会发现可以调整图像质量。 您将不得不使用质量设置,直到找到满意的外观与文件大小之间的平衡。 我会一直调整此设置-仅此一项就可以对您的文件大小产生巨大的影响。

4. Load images dynamically.

4.动态加载图像。

A great new feature of MX is that it gives you the ability to load .jpg graphics dynamically. This is achieved in the same way you would load an external .swf — using the loadMovie() action. Add a MovieClip to the stage and give it and instance name of "imageholder". Then add the following actionscript to a keyframe:

MX的一项重大新功能是,它使您能够动态加载.jpg图形。 这可以通过与加载外部.swf相同的方式来实现-使用loadMovie()操作。 将MovieClip添加到舞台上,并为其指定名称和“ imageholder”的实例。 然后将以下动作脚本添加到关键帧:

loadMovie("name_of_jpg.jpg","imageholder");

Warning! Progressive JPEG images do not appear when loaded dynamically using the loadMovie action.

警告! 使用loadMovie操作动态加载时,渐进JPEG图像不会出现。

5. Other useful tips to optimize images.

5.优化图像的其他有用技巧。

Using the Modify — Smooth, Straighten and Optimize commands found on the menu bar to refine shapes and lines may also help to reduce the overall size of your swf. You can use these commands repeatedly on a shape until you are satisfied with the level of optimization, or the look of the graphic.

使用菜单栏上的“修改—平滑,拉直和优化”命令来细化形状和线条也可能有助于减小swf的整体大小。 您可以在形状上重复使用这些命令,直到对优化级别或图形外观感到满意为止。

Also in the Modify menu is the Trace Bitmap command. This command will convert a bitmap to a vector image, and often does a good job — though, usually, the quality of conversion depends on the complexity of the image. Typically .gifs convert better than .jpgs. You may want to play with this command and see how it affects different graphics.

在“修改”菜单中还有“跟踪位图”命令。 此命令会将位图转换为矢量图像,并且通常做得很好-尽管通常转换的质量取决于图像的复杂性。 通常,.gif的转换效果好于.jpgs。 您可能要使用此命令,看看它如何影响不同的图形。

6. Limit the number of special line types such as dashed, dotted, ragged, and so on.

6.限制特殊线型的数量,例如虚线,点线,参差不齐等等。

Solid lines are smaller. Lines created with the pencil tool require less memory than brush strokes.

实线较小。 用铅笔工具创建的线比画笔描边需要更少的内存。

7. Use layers to separate elements that change over the course of the animation from those that don’t.

7.使用图层将在动画过程中更改的元素与未更改的元素分开。

A nice feature of Flash is that, no matter how many layers you use, this won’t have any impact on the size of your Flash movie. Therefore, it’s good practice to place non-animated objects on their own layer, separating them from animated objects.

Flash的一个不错的功能是,无论您使用多少层,这都不会对Flash电影的大小产生任何影响。 因此,优良作法是将非动画对象放置在它们自己的图层上,将它们与动画对象分开。

8. Limit the number of fonts and font styles.

8.限制字体和字体样式的数量。

The more fonts you use, the more fonts Flash has to save in your .swf — and the more fonts saved in your .swf, the bigger the file size will be. Pretty simple right?

您使用的字体越多,Flash必须在.swf中保存的字体就越多-.swf中保存的字体越多,文件的大小将越大。 很简单吧?

Here’s a useful tip, though. Let’s say you just got this really nifty font, and you want to use it on a few buttons. In order for that font to be seen by people that don’t have the font installed, you’ll have to embed it. This is pretty easy — just go to the character options for that font, and there you’ll be the option to embed the entire font, uppercase characters, lowercase characters, numerals and punctuation.

不过,这里有个有用的提示。 假设您刚刚得到了这种非常漂亮的字体,并且想要在几个按钮上使用它。 为了使未安装该字体的人看到该字体,您必须将其嵌入。 这非常简单-只需转到该字体的字符选项,即可选择嵌入整个字体,大写字母,小写字母,数字和标点符号。

If all you want is the button to say "home" or something this simple, then there’s no use in embedding the entire alphabet, just go to the input box that says, "and these characters" and type in "home" This way you’re only storing 4 characters in your .swf file.

如果您只需要按钮说“ home”或类似的简单内容,那么嵌入整个字母就没有用,只需转到输入框,输入“和这些字符”,然后键入“ home”即可。在.swf文件中仅存储4个字符。

9. Import text into your Flash movie.

9.将文本导入Flash电影。

You may want to decide to keep your text separate from your Flash movie. This allows you to easily make modifications without having to open up Flash — and can make it easy for someone who doesn’t have Flash or Flash knowledge to make changes. They can simply edit a .txt file. In addition, your .swf file will be smaller because Flash will no longer be responsible for storing your text.

您可能需要决定使文本与Flash电影分开。 这样一来,您无需打开Flash即可轻松进行修改-并使不具备Flash或Flash知识的人可以轻松进行更改。 他们可以简单地编辑.txt文件。 此外,由于Flash将不再负责存储文本,因此.swf文件将更小。

How can you create the external text file and import it into Flash?

如何创建外部文本文件并将其导入Flash?

  1. Open up notepad and follow this pattern:

    打开记事本,并遵循以下模式:

    variable_name=content&variable_name2=content&

    The content is attached to each variable, and will soon be loaded into Flash.

    内容附加到每个变量,并将很快加载到Flash中。

    The "&" is the delimiter. Save your .txt file with the name "content.txt".

    & ”是分隔符。 用名称“ content.txt”保存您的.txt文件。

  2. Next, add this script to a keyframe in Flash:

    接下来,将此脚本添加到Flash中的关键帧:

    loadVariablesNum("content.txt", "0")

    This loads the content.txt file into level0 of your movie. You could also use:

    这会将content.txt文件加载到电影的level0中。 您还可以使用:

    loadVariables("content.txt","MovieClip")

    which would load the content into the MovieClip with the given instance name.

    它将使用给定的实例名称将内容加载到MovieClip中。

  3. Lastly, add your dynamic text fields to your scene, and assign them the variable names that you used in content.txt.
    最后,将动态文本字段添加到场景中,并为它们分配您在content.txt中使用的变量名称。

Because your text no longer resides in your Flash movie, you decrease the file size, and your main Flash movie will now load more quickly: instead of having to preload a 150K swf, you may only have to preload a 100K swf.

由于您的文本不再驻留在Flash电影中,因此可以减小文件大小,并且主Flash电影现在可以更快地加载:不必预先加载150K瑞士法郎,而只需预加载100K瑞士法郎。

10. Optimizing Sound in Flash.

10.优化Flash中的声音。

Use MP3 compression, the smallest sound form when possible.

使用MP3压缩,这是最小的声音形式。

Once you’ve imported in your MP3 file, open your library with CTRL+L and right-click to bring up properties. You may want to uncheck "use imported MP3 quality" — with this option unchecked, you can change both the Bit Rate and Quality. You may find that a lower Bit Rate and Quality reduces file size while producing a sound that’s still fine for use.

导入MP3文件后,请使用CTRL + L打开库,然后单击鼠标右键以显示属性。 您可能要取消选中“使用导入的MP3质量”,如果不选中此选项,则可以更改“比特率”和“质量”。 您可能会发现较低的“比特率和质量”会减小文件的大小,同时产生仍适合使用的声音。

11. Use the Color Effects menu in the Instance properties dialog box to create many different colored Instances of a single symbol.

11.使用“实例属性”对话框中的“颜色效果”菜单创建单个符号的许多不同颜色的实例。

Every instance of a symbol has specific properties that can be modified. These properties apply only to the specific instance — not the original symbol.

符号的每个实例都有可以修改的特定属性。 这些属性仅适用于特定实例,而不适用于原始符号。

You can, for instance, use the tint option in the color properties of the selected object to change its color, instead of creating another symbol. Other properties include brightness, and alpha. By using a single instance of an object multiple times, you again re the overall file size.

例如,您可以在所选对象的颜色属性中使用“色调”选项来更改其颜色,而不用创建另一个符号。 其他属性包括亮度和alpha。 通过多次使用一个对象的单个实例,您再次重新确定了整个文件的大小。

12. Modularize your movies.

12.模块化电影。

Modularization is the process of breaking up a single large Flash movie into multiple smaller .swf files in an effort to decrease the load time, and make your movie easier to manage. You can learn more about modularization by reading SitePoint’s article titled Modularize Flash.

模块化是将单个大型Flash电影分成多个较小的.swf文件的过程,以减少加载时间并使电影更易于管理。 您可以阅读SitePoint标题为Modularize Flash的文章,以了解有关模块化的更多信息。

Remember the words of Stan Lee: "With great power comes great responsibility." The responsible Flash user will take great steps to ensure that their Flash site loads as quickly as possible, even if that means sacrificing a little eye-candy.

记住斯坦·李(Stan Lee)的话:“能力越大,责任就越大”。 负责任的Flash用户将采取重要措施,以确保尽快加载其Flash网站,即使这意味着要牺牲一点眼力。

翻译自: https://www.sitepoint.com/steps-faster-flash/

快闪视频快影

快闪视频快影_快闪的12个步骤!相关推荐

  1. 手机闪存速度排行_手机闪存读写速度对比?一加不如iQOO,华为最强,默秒全...

    如果说手机处理器就像是汽车的发动机一样,那么闪存应该可以说是汽车的变速箱,手机闪存的读取.写入速度,对于手机日常使用运行应用程序.复制文件.安装应用程序--等等,都有潜移默化的影响.一般来说,手机的闪 ...

  2. 手机闪存速度排行_手机闪存性能排行

    手机专用闪存主要分为eMMC和UFS两大类别,前者仅支持并行读写(即半双工运行,读写必须分开执行),哪怕是最新的eMMC5.1标准其顺序读取和写入速度也不过300MB/s和200MB/s左右,常见于售 ...

  3. 以管理员身份运行闪退怎么解决_批处理闪退、运行中断等问题的处理方法

    因为我只会一些批处理代码,所以我的"局域网共享一键修复"等软件就都做成了批处理程序(后缀名为.bat)供大家使用.有些网友反馈:右键运行批处理,会一闪而过.或者,运行后共享修复也不 ...

  4. epic打开一直闪_教你用意派Epub360做酷炫的快闪H5!(附快闪H5模板)

    近来,抖音国际版Tik Tok一直深陷舆论漩涡,引起了吃瓜群众们的热烈讨论.作为短视频中的佼佼者,抖音带火了一大波网络红人.土味视频,也为快闪等创意视频的发展提供了一方沃土.而随着快闪视频的普及,快闪 ...

  5. html快闪软件制作,快闪视频制作方法

    猜你喜欢: 快闪视频制作软件推荐: 目录: 右糖是一个电子音乐相册制作网站,拥有海量的视频模板,你可以在右糖上传照片然后快速生成一个快闪视频.只需要找到一个心意的快闪视频模板,然后上传照片之后进行渲染 ...

  6. 介绍一个手机端快闪视频制作工具

    快闪视频助手,制作图文快闪视频, app store: https://itunes.apple.com/us/app/%E6%96%87%E5%AD%97%E5%BF%AB%E9%97%AA%E5% ...

  7. 华为scp快充协议详解_连华为SCP快充都支持 台电双口充电头测试

    随着手机性能提升和电池容量的局限的矛盾不断升级,使用快充在碎片时间充电效率更高成为当前最佳的解决方案.目前比较流行的是QC快充.PD快充.VOOC闪充和华为的FCP/SCP.其中由于VOOC闪充对充电 ...

  8. 华为scp快充协议详解_带有USB-C支持SCP的移动电源可以为华为手机提供SCP快充么?答案在这里...

    带有USB-C支持SCP的移动电源可以为华为手机提供SCP快充么?答案在这里 2020-03-26 14:33:52 6点赞 16收藏 6评论 随着快充技术在手机市场的流行开来,作为国内手机大厂的华为 ...

  9. 腾讯视频客户端如何设置快进速度

    今天小编给大家分享"腾讯视频客户端如何设置快进速度".大家都知道腾讯视频作为中国最大的视频分享网站,它有非常全面的视频资源.而我们只要通过下载这个客户端,就可以完全的将这些视频尽收 ...

  10. 腾讯视频投屏显示无法连接服务器,腾讯视频投屏不能快进

    腾讯视频投屏不能快进似乎是很多网友遇到的问题,因为不能快进,很多网友要浪费时间去看重复的镜头,很是烦人,那么腾讯视频投屏不能快进要怎么办呢?下面一起来了解一下吧! 腾讯视频投屏不能快进解决办法: 手机 ...

最新文章

  1. R-C3D 视频活动检测
  2. c++重定向后恢复_【STM32CubeIDE】重定向printf
  3. shell编程服务器维护,简单监测服务器的shell脚本
  4. 07.MyBatis中的关联查询
  5. HA集群之三:corosync+pacemaker实现httpd服务的高可用
  6. 医学图像数据集和处理工具【总结】
  7. Java toBinaryString()函数探究及Math.abs(-2147483648)=-2147483648原理探究
  8. 2021年,开发者们如何拥抱 5G 消息?
  9. Silverlight中使用Timer的方法
  10. Java程序设计基础笔记 • 【第7章 Java中的类和对象】
  11. 深入浅出看懂AlphaGo Zero (文章最后有原AlphaGo Zero论文地址)
  12. Linux mysql 主从 配置
  13. 单向散列函数的实际应用
  14. 电视电信显示服务器连接错误,中国电信宽带怎样连接老电视连接好后电视怎么显示没...
  15. 【字节(北京)AML图计算算法实习生】面试经历
  16. 游程编码用matlab实现代码_二值图像游程编码matlab代码
  17. android控制电路板的开关灯,一文解读LED触摸调光台灯控制电路板的工作原理
  18. SpringCloud整合Seata1.4.0
  19. PHP Framework 数据库框架 Medoo 2.1:使用 Medoo 连接MYSQL数据库
  20. 一位软件工程师的经历

热门文章

  1. 机器学习在网络中的实际应用
  2. Macbook Pro 扩展内存
  3. uwsgi+nginx高并发下报错500
  4. cad调了比例因子没反应_CAD教程:自由缩放命令的操作流程
  5. Premiere 常用视频概念
  6. 国内域名国内服务器,不备案解决80端口不开放方法
  7. python绘制相频特性曲线_用Python绘制音乐图谱
  8. python多条件选股_通达信几种实用的条件选股公式,一旦掌握,至少翻翻!
  9. 软件项目管理MOOC(北邮)——第十章测试答案
  10. 配置zigbee模块