是“出口电影”吗?作为带有动作脚本动画的电影的 PNG 序列可以在 Flash CS4 中吗?

发布于 2024-08-19 16:20:16 字数 227 浏览 7 评论 0原文

我想知道是否有任何方法可以使用“导出电影”作为“PNG 序列”来处理使用动作脚本对对象进行动画处理的电影。像这样导出对于普通动画来说非常好用,但它不适用于我当前的项目。基本上我正在使用数学创建图像,并且我希望能够将结果导出为 png 以便在 Photoshop 等其他程序中使用;但由于图像是使用动作脚本创建的,因此导出仅显示空白图像。我是否只能截取结果的屏幕截图并使用魔杖工具繁琐地删除所有应该透明的区域?有人请告诉我有更好的方法;谢谢!

I was wondering if there is any way to use the "Export Movie" as "PNG Sequence" to work for movies where objects are animated with actionscript. Exporting like this works just dandy for normal animations, but it doesn't work for my current project. Basically I am creating images using mathematics and I want to be able to export the result as a png for use in other programs like photoshop; but since the images are created with actionscript the export just shows a blank image. Am I reduced to just taking a screenshot of the result and tediously removing all the should-be-transparent regions with the wand tool? Someone please tell me there is a better way; thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

墨落成白 2024-08-26 16:20:16

从 Flash CS3 开始,您可以将动作脚本动画/形状导出为 Quicktime。

  1. 转到文件>导出电影> Quicktime
  2. 在 Quicktime 导出设置中选择经过一段时间而不是到达最后一帧时
  3. 勾选忽略舞台颜色(生成 Alpha 通道)

您应该能够在 Photoshop Extended 中导入 Quicktime 影片,从 CS3 版本开始,它具有时间轴(窗口 > 动画)。在 CS4 中,有一个视频工作区应该会有所帮助。

这对我来说似乎是最简单的方法。

如果您想坚持使用更多代码,可以尝试 Lee Felarca 的 SimpleFLVWriter(虽然有点旧,所以先测试一下)或者将您的 swf 放入 AIR 应用程序并使用 Adobe AS3CoreLib

您可以将您的视频发布到 vimeo 上并分享链接吗(我想看^_^)?

祝你好运,
乔治

Since Flash CS3 you can export your actionscript animations/shapes as quicktime.

  1. Go to File > Export Movie > Quicktime
  2. In the Quicktime Export Settings pick After time elapsed instead of When last frame is reached.
  3. Tick Ignore Stage color(generate alpha channel).

You should be able to import the Quicktime movie in Photoshop Extended which since version CS3 has a Timeline(Window > Animation). In CS4 there is a Video Workspace which should help.

This seems the easiest method to me.

If you want to stick to more code, you could try Lee Felarca's SimpleFLVWriter ( it is a bit old though, so test first ) or make your swf into an AIR Application and use the the PNGEcoder from the Adobe AS3CoreLib.

Could you post your video on vimeo and share the link please(I wanna see ^_^) ?

Goodluck,
George

森罗 2024-08-26 16:20:16

刚刚发布了一个 AIR 应用程序,用于将 SWF 导出为 PNG 序列: http://swfrenderer.kurst.co.uk/ - 希望它有帮助...

Just released an AIR application to export an SWF to a PNG sequence: http://swfrenderer.kurst.co.uk/ - hope it helps...

森末i 2024-08-26 16:20:16

据我所知,导出影片剪辑不会运行任何动作脚本,它只会输出所有帧及其(静态)内容。

我真的不知道是否可以做到,您的屏幕截图解决方案似乎是唯一的..

As far as i know, exporting a movieclip will not run any actionscript, it will only output all frames and their (static) content.

I really dont know if it can be done and your screenshot solution seems the only one ..

南街女流氓 2024-08-26 16:20:16

使用 ActionScript 的 Socket 类。拍摄舞台快照(使用 BitmapData 类),然后通过套接字将其发送到计算机上运行的另一个脚本,其中保存图片。我必须使用 Python 来做这样的事情,而且效果很好。对于动画,您可能无法获得最佳帧速率。但只要动画不依赖于时间就应该没问题。

如何执行此操作的示例(未经测试):

var sock:Socket = new Socket(yourIP, somePort);
var drawRect:Rectangle = new Rectangle(0, 0, 550, 400);
var bmp:BitmapData = new BitmapData(drawRect.width, drawRect.height, true, 0x00000000);
bmp.draw(stage, null, null, null, drawRect);
var pixels:ByteArray = bmp.getPixels(drawRect);
for each (var pixel in pixels) {
    sock.writeUnsignedInt(pixel);
}

请注意,您可能需要将最后一个块放入“connect”事件中。另请注意,我仍在迁移到 AS3,因此其中一些内容可能已经过时。

Use ActionScript's Socket class. Take a snapshot of the stage (using BitmapData class), and send it to another script running on your computer via a socket, where the picture is saved. I had to something like this using Python, and it worked great. For animations, you might not get the best frame rate. But it should be fine so long as the animation isn't time dependent.

An example of how you'd do this (untested):

var sock:Socket = new Socket(yourIP, somePort);
var drawRect:Rectangle = new Rectangle(0, 0, 550, 400);
var bmp:BitmapData = new BitmapData(drawRect.width, drawRect.height, true, 0x00000000);
bmp.draw(stage, null, null, null, drawRect);
var pixels:ByteArray = bmp.getPixels(drawRect);
for each (var pixel in pixels) {
    sock.writeUnsignedInt(pixel);
}

Note that you might need to put the last chunk in a "connect" Event. And also note that I'm still migrating to AS3, so some of that might be outdated.

薄凉少年不暖心 2024-08-26 16:20:16

这是一个免费的工具,非常好用。
http://swfrenderer.kurst.co.uk/

它可以将任何 swf 转换为 png 序列。
优点:

  1. “quicktime 方法”有一个问题,即默认应用深色背景的“Multiple”。
  2. 您不必处理任何内部文件,例如 .mov。

Here's a free tool to use, very nice one.
http://swfrenderer.kurst.co.uk/

It can convert any swf to png sequence.
Benifits:

  1. The "quicktime method" has a problem that default applying "Multiple" with dark background.
  2. You don't have to deal with any internal file, like .mov.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文