如何分割SWF文件?
是否可以将 SWF 文件分为 n 个部分? (例如n = 2)
我的意思不是时间上的划分,而是空间上的划分。例如,我想要 2 个 swf 文件,一个是主 swf 的左半部分,另一个是右半部分。这可能吗?
提前致谢。
Is it possible to divide a SWF file into n parts? (for example 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. is that possible?
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,这是可能的。但需要注意的是:两个物理上不同的 .swf 彼此相邻可能是一个坏主意。根据您的需要,加载两个 .swf 的一个主 .swf 可能会起作用。
请参阅:
http://kb2.adobe.com/cps/141/tn_14190.html
它具有在 as2 和 as3 中定位文件的所有方法。
一般来说,您将拥有一个较小的主文件,以及两个将加载到其中的更大的 .swf 文件。
需要注意的一些事项:根据您的应用程序以及您使用的是 as3 还是 as2,可能更愿意简单地将图像和其他数据加载到 .swf 中,而不是这样做。
另外,您实际上可以开始加载 .swf,例如在整个 .swf 实际下载之前加载动画。
因此它将加载整个文件的 5% 并开始动画。如果下载速度变慢,.swf 动画将停止,但一旦下载更多数据或速度加快,它就会继续。对于任何已编程的 .swf 都可以执行相同的操作,尽管它需要一些技巧和一点点编程。如果您对最后一件事感兴趣,请提出另一个问题。
Yes, it is possible. One note though: two physically distinct .swf's one next to each other is probably a bad idea. One master .swf into which two .swf's are loaded could work, depending on your needs.
Please consult this:
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.
Generally, you are going to have one low size master file, and two much bigger .swfs that will be loaded inside it.
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.
Also, you can actually start to load a .swf, lets say an animation before the whole .swf has actually downloaded.
So it will load 5% of the whole file and start the 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. The same can be done for any programmed .swf, though it requries a few tricks and a little bit of programming. Ask another question if you are interested in this last thing.
不可能将单个 swf 文件分成多个 swf 二进制文件。
您可以做的是构建一个 shell swf,该 shell swf 加载子 swf n 次,并为每个 swf 提供自定义掩码。但是,您实际上会运行子 swf 的多个实例,因此性能开销会成倍增加。
It is not possible to take a single swf file and divide it into multiple swf binaries.
What you could do is build a shell swf that loads the child swf n times, and presents them each with custom masks. However, you would effectively be running multiple instances of the child swf, so performance overhead would multiply.