[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] Preview JPEG of a SWF

From: Benjamin Wolsey
Subject: Re: [Swftools-common] Preview JPEG of a SWF
Date: Wed, 13 Oct 2010 09:11:45 +0200

Am Sonntag, den 10.10.2010, 09:51 +0200 schrieb Chris:
> I think we may have been talking at cross-purposes here, Ben.  You are 
> referring
> here to 'interpreted', as in on-the-fly execution and debugging?  

I'm not sure about the example you gave, but I was implying that
execution of ActionScript bytecode is often integral to the appearance
of a SWF.

I will now be explicit: producing a preview of a SWF is a complicated

If you look at the output of a tool like pdf2swf, you'll see it's a very
rare case: each frame is static and self-contained, so you can process
the data for that frame to get a perfect screenshot.

But most of the time, SWFs use dynamic resources through ActionScript,
static processing using SWF tags, which affect the way a frame looks:

- Actionscript properties such as _yscale, _x, _alpha can dynamically
change the position of sprites.
- Sprites placed in previous frames remain on the stage.
- PlaceObject tags can move sprites that are already on the stage.
- Morphs morph.
- Videos play.
- Variables are loaded from XML or LoadVars.
- Data can be retrieved from an XMLSocket.
- NetConnection supports remoting.
- ActionScript has a drawing API for shapes, solid, gradient and bitmap
- BitmapData objects can be used to load or draw Bitmaps and manipulate
- Filters and blend modes are available in ActionScript.
- MovieClips and TextFields can be dynamically created in ActionScript.
- You can load images, videos, and other SWFs dynamically.

To generate a screenshot of any particular frame, you usually can't just
look at it in isolation. Even for the very first frame, which obviously
doesn't depend on other frames, it can be partly or entirely generated
in ActionScript. Sometimes the first frame is a loader frame, which you
may not want anyway.

Moreover, exactly what a frame looks like can also depend on external
factors, such as user input (where the mouse is positioned or what key
is pressed), waiting for loads, or remote calls.

So, in short and for future reference: you need to know exactly what you
want before selecting a tool to produce a preview:

- What do you regard as a preview, e.g. always the first frame, or
perhaps the first significant frame?
- Do you have any control over the type of SWF you're previewing, e.g.
can you say for certain whether it has ActionScript or not, or which
other resources it uses?
- Do you know where you have to click to get to the next frame?

And finally: if you want to produce reliably a meaningful preview of any
SWF out there, there is no tool or algorithm that can do it for you!


The current release of Gnash is 0.8.8

Benjamin Wolsey, Software Developer - http://benjaminwolsey.de
C++ and Open-Source Flash blog - http://www.benjaminwolsey.de/bwysblog


Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]