how to extract flash frames programmatically

Hello i need to extract frame (can be every number ) from flash swf and convert it to jpg/png/.. programmatically what is the best way to do that ? never mind the programming lang

Answers


Do you have the original .fla files or only the .swf ones?

Anyway, if your using Actionscript 3, then every instance of DisplayObject and its subclasses (Stage, Sprite, MovieClip...) can be captured to a Bitmap. To do that, create a BitmapData object and use its draw method.

It would look like something like this:

do {
    bitmapData.draw(someMC);
    //then send the data to some server-side page
    //using getPixel or some other solution
    someMC.nextFrame();
} while (someMC.currentFrame =< someMC.totalFrames)

For more info on how to transfer the image to a server-side page check this: http://www.sephiroth.it/tutorials/flashPHP/print_screen/index.php

If you only have the swf file, you can try to load it inside your own swf and run the above code.


Check out swfextract, part of swftools. It's a console app so you can easily drive it from your own software.


Need Your Help

Deferred EL in JSP 2.0

jsp el

Is there a way to use something like deferred EL in JSP 2.0 / J2EE 1.4? The idea is to pass a test to a tag file and have it display an item in a list (or not) based on the value of the expression.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.