开发者

Is "Export Movie" as PNG Sequence for movies with actionscript animation possible in Flash CS4?

I was wondering if there is any way to use the "Export Movie" as "PNG Sequence" to work for movies where objects ar开发者_Go百科e 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!


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


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


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 ..


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.


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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜