问题描述
是否可以使用 AS3 以编程方式生成 .swf 文件?我的小应用程序所做的是使用 FileReference 加载一堆图像,现在我想将它们编译成用户可以下载的独立 swf(该 swf 将是幻灯片).
Is it possible, using AS3, to programmatically generate a .swf file? What my little app does is load a bunch of images, using FileReference, now I want to compile them into a stand-alone swf that the user can download (the swf will be a slideshow).
似乎对我的要求有些误解.我想要一个编译的 swf,用户可以从中选择一些图像并按下一个按钮,由此 swf 将创建和编译包含所述图像的第二个 swf.由于这是一个独立的应用程序,因此不会有服务器端交互.
There seems to be some mis-understanding of what I am asking. I want to have one compiled swf from which the user may select some images and press a button whereby the swf will create and compile a second swf containing said images. As this is a stand-alone app, there will be no server-side interaction.
我在想的是会有一个字符串代表一个动态类.当用户选择他们的图像时,适当的嵌入标签被添加到这个字符串中,然后编译并保存到用户的桌面.
What I am thinking is that there will be a string representing a dynamic class. When the user selects their images the appropriate embed tags are added to this string, which is then compiled and saved to the user's desktop.
所以我的问题是,编译后的 swf 可以生成并编译第二个 swf 吗?
So my question is, can a compiled swf generate and compile a second swf?
推荐答案
看看这个库,它允许你在运行时创建一个 .swf.https://github.com/claus/as3swf
Take a look at this library, this allows you to create a .swf at runtime.https://github.com/claus/as3swf
这篇关于AS3 生成动态 SWF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!