简体   繁体   English

如何分割 SWF 文件?

[英]How to divide a SWF file?

Is it possible to divide a SWF file into n parts?是否可以将 SWF 文件分成 n 个部分? (for example n = 2) (例如 n = 2)

what i mean is not division in time, but division in space.我的意思不是时间上的划分,而是空间上的划分。 i want to have 2 swf files for example, one is left half of master swf and other is right half.例如,我想要 2 个 swf 文件,一个是主 swf 的左半部分,另一个是右半部分。 is that possible?那可能吗?

thanks in advance.提前致谢。

Yes, it is possible.对的,这是可能的。 One note though: two physically distinct.swf's one next to each other is probably a bad idea.不过需要注意的是:两个物理上不同的.swf 彼此相邻可能是个坏主意。 One master.swf into which two.swf's are loaded could work, depending on your needs.根据您的需要,加载两个.swf 的一个master.swf 可以工作。

Please consult this:请参考:

http://kb2.adobe.com/cps/141/tn_14190.html http://kb2.adobe.com/cps/141/tn_14190.html

it has all the ways that one can use to position files in as2 and as3.它具有可用于 as2 和 as3 中 position 文件的所有方法。

Generally, you are going to have one low size master file, and two much bigger.swfs that will be loaded inside it.通常,您将拥有一个较小的主文件,以及两个更大的.swf 文件,它们将被加载到其中。

Some things to note: depending on your application and whether you are using as3 or as2, it might be prefered to simply load images and other data into.swf's instead of doing this.需要注意的一些事项:根据您的应用程序以及您使用的是 as3 还是 as2,可能更愿意将图像和其他数据简单地加载到 .swf 中,而不是这样做。

Also, you can actually start to load a.swf, lets say an animation before the whole.swf has actually downloaded.此外,您实际上可以开始加载 a.swf,比如说 animation 在整个.swf 实际下载之前。

So it will load 5% of the whole file and start the animation.因此它将加载整个文件的 5% 并启动 animation。 If the download slows down, the.swf animation will stall, but it will continue as soon as more data is downloaded or the speed picks up.如果下载速度变慢,则.swf animation 将停止,但一旦下载更多数据或速度加快,它将继续。 The same can be done for any programmed.swf, though it requries a few tricks and a little bit of programming.可以对任何已编程的.swf 执行相同的操作,尽管它需要一些技巧和一点点编程。 Ask another question if you are interested in this last thing.如果您对最后一件事感兴趣,请提出另一个问题。

It is not possible to take a single swf file and divide it into multiple swf binaries.不可能将单个 swf 文件分成多个 swf 二进制文件。

What you could do is build a shell swf that loads the child swf n times, and presents them each with custom masks.您可以做的是构建一个 shell swf 加载子 swf n 次,并为它们每个提供自定义掩码。 However, you would effectively be running multiple instances of the child swf, so performance overhead would multiply.但是,您将有效地运行子 swf 的多个实例,因此性能开销会成倍增加。

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

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