使用 C++ 从 *.fla 导出 *.png 序列
我的程序中需要一个动画。我的设计师在 Flash 中绘制动画并为我提供 *.fla 文件。我所需要的只是从该文件中获取 30-40 个 PNG 并将它们存储在我的内部存储中。
是否可以使用 C++ 从 *.fla 获取资源?也许某些 Adobe OLE 对象可以提供帮助?
拜托,建议。
提前致谢。
I need an animation in my program. My designer draws animation in Flash and provides me with *.fla file. All I need is to grab 30-40 PNGs from this file and store them within my internal storage.
Is it possible grab resources from *.fla with C++ ? Probably, some Adobe OLE objects can help?
Please, advice.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我要求艺术家为我制作一个图标,我不会期望需要编写代码来将 .3DS 模型转换为可用的图标格式。
让您的设计师使用文件->导出并为您提供图层和框架的 PNG 文件而不是 .FLA 文件(如果您的设计需要这种格式),您可以节省大量时间和麻烦。执行。
如果由于某种原因这是不可能的,那么您可能会找到一个具有命令行选项的闪存反编译器,您可以从程序中启动该选项来提取资产作为加载序列的一部分,但这通常会被拒绝,因为这不是预期用途.swf/.fla 的专有格式比您应该设计应用程序从二进制可执行文件中提取源代码更重要。
If I asked an artist to make me an icon I wouldn't expect to need to write code to convert a .3DS model into a usable icon format.
You can save yourself a lot of time and hassle by having your designer use File->Export and give you PNGs of the layers and frames instead of a .FLA file if that's the format you require for your implementation.
If that's not possible for some reason then you can probably find a flash decompiler that has a command line option which you could launch from your program to extract assets as part of your loading sequence but that is generally frowned upon because this is not the intended use of the proprietary format for .swf/.fla anymore than you should design applications to extract source code from a binary executable.
假设
然后只需将 FLA 保存为 XFL 文件,您就可以从库文件夹(但为什么不直接让他们给你邮寄 png?)
因此,如果由于某种原因你只能访问 fla 而不能访问设计器,那么你可以通过将 fla 重命名为 .zip 以编程方式完成此操作,提取..并且您有 XFL 格式。
Assuming
Then simply get the FLA saved as a XFL file, and you will be able to grab them from the library folder ( but then why not just get them to mail you the pngs ? )
So if for some reason you can only get access to the fla and not the designer, then you can do it programatically by renaming the fla to .zip, extracting.. and you have the XFL format.