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
A:
Easiest solution would be to use a free screen capture program such as CamStudio.
Gary Green
2009-02-09 16:05:47
He said *programmatically*...
Camilo Martin
2010-09-18 23:56:23
A:
Check out swfextract, part of swftools. It's a console app so you can easily drive it from your own software.
Paul Dixon
2009-02-09 16:18:41
great tools , but i need the option to do it on remote swf file i didnt found any way to do that
2009-02-11 06:04:03
If it's remote, then you need to retrieve the swf from this remote location, then process it!
Paul Dixon
2009-02-11 09:50:06
Note that swfextract doesn't actually render the frames to images. Yes, it can extract existing images from flash, but if you're just extracting vector animations it just extracts as a new flash file.
John
2010-01-21 12:21:51
+1
A:
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.
facildelembrar
2009-02-09 21:11:22
Yes, however, flash has some security restrictions when loading swfs from different domains. You have to check the API for each method and see if they throw a SecurityError.
facildelembrar
2009-02-11 23:06:30
Just checked and the draw method does throws a SecurityError, so you have to transfer the remote swfs to the same domain as the one you're running the loader.
facildelembrar
2009-02-11 23:13:37