z0r Forums

Full Version: Creating previews of flash files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey,
has anyone here an idea how to create preview images of .swf files?
Maybe even automated on the server?
Thanks Smile
(28-06-2011, 09:40)eins Wrote: [ -> ]Hey,
has anyone here an idea how to create preview images of .swf files?
Maybe even automated on the server?
Thanks Smile

One possibility is to load the .swf with an Loader into another .swf, gotoAndStop to the frame you want to capture and then get the BitmapData of the Loader. Send it to a .php-script and save it to a picture.

This could help you: http://www.onegiantmedia.com/image---as3...hard-drive

if you have questions follow me on twitter so i get your questions in time Wink http://www.twitter.com/daZwiafl
https://github.com/AdamN/python-webkit2png/

Possibly need to run with --feature=plugins --wait=(some number)
And flash plugin must be installed, of course.

It captures from web pages, not flash directly, so there should be webserver or static pages with only flash movie in left top corner to be easily cropped.

Easily automateable on server. Works under Linux, Windows and Mac OS. May require xvfb X server, but maybe it is optional.
Okay, both options look interesting, but i dont have flash or python installed at the moment.
Also i dont think i know anything about AS, so the first thing would be pretty complicated for me... unless someone makes that .swf for me Smile
I have an app called Soufflé on Mac OS X which can create those screenshots for use in Finder (including quick look).

But I do not know weather it is possible to use parts of this on a server as well...
Okay, i found Swftools, and it has a programm called Swfrender ( http://wiki.swftools.org/index.php/Swfrender ), that does exactly that.
Installed it and wrote a script that makes automated previews. tested with the loops 0-40.
Takes about 0.3s per preview image. The result isnt really good, but its useable.
http://raz.z0r.de/swftest.php (method 1, their "legacy" mode, gives better results in my opinion)

Soneone on Facebook also told me that 'gnash' has the option to give an png output, but i couldnt find any info on google. Still have to look into that Smile
Sometimes it captured the loading screen of the loop.
Isn't there an option to take the 2nd second of the loop or sth. like that?

The one on the right side are sometimes better but sometimes they cut off the background
Nope, Swfrender does not have such an option.
As far as i know its actually only intended to create pictures of .swf's created with the Swftools pack, thats why there are so many errors Smile
hi...

i've did a bit of experimenting...
my script won't be much faster then swftools... but i've managed to capture a given frame of all the AS3-loops... but i'm suffering with the older ones.

i'll do some further testing and will host the app sometime tomorrow.
link following....

maybe it's usefull for u
(28-06-2011, 17:54)eins Wrote: [ -> ]Soneone on Facebook also told me that 'gnash' has the option to give an png output, but i couldnt find any info on google. Still have to look into that Smile

Gnash can do that:
Code:
gnash --screenshot 1 --screenshot-file myscreenshot.png myflashanim.swf
This will save the frame 1 of myflashanime.swf into myscreenshot.png.
[/code]
Pages: 1 2