[Top][All Lists]

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

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

From: Chris
Subject: Re: [Swftools-common] Preview JPEG of a SWF
Date: Wed, 13 Oct 2010 15:29:56 +0200

>On Wed, 13 Oct 2010 09:11:45 +0200
>Benjamin Wolsey <address@hidden> wrote:

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

You're doing that thing that programmers do best, aren't you?

 input[ simple ] ==> Function [add complication ] ==> errr..Scheibenkleister!!!


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

Then we a slight difference of opinion.  Putting a frame together is simply
a matter of reading the tags associated that frame, and applying them. Putting
a movie together is a matter of interpreting the tags then sequencing the
rendered frames to the display.
> 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.

Not that rare, surely?  For at it's most basic level, that's exactly what the
Flash player plug-in does, render each frame as a self-contained entity.  If it
didn't, things like internal/external links wouldn't work.  But, pdf2swf wasn't 
designed as an interactive flash player, so how is it supposed to interpret
interactive content, as in frames within frames, movies within movies?

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

I think you mean the *player* there, no?  ActionScript is merely a way of
giving the player instructions.

> - Actionscript properties such as _yscale, _x, _alpha can dynamically
> change the position of sprites.


> - Sprites placed in previous frames remain on the stage.

Unless they are removed.

> - PlaceObject tags can move sprites that are already on the stage.

If we are being pedantic here, PlaceObject2 & 3.  The old Tag is rarely used.

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

( .. wonders where this is going.. :o) )

> fills.  BitmapData objects can be used to load or draw Bitmaps and manipulate
> them. 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.

I don't disagree with any of that, but I'm still not sure where this going..
> To generate a screenshot of any particular frame, you usually can't just
> look at it in isolation.

Ahh.  Is there any reason why you would wish to?  The flash player plug-in does
that for you.  Once it's done it's job, you get the frame.

> Even for the very first frame, which obviously doesn't depend on other frames

It obviously does if it contains any dynamic content.  Because that is the way 
it works.  *All* pertinent Tags are evaluated and the frame rendered *before* 

>it can be partly or entirely generated in ActionScript. Sometimes the first 
>frame > is a loader frame, which you may not want anyway.

.. loaders are rarely single frames.

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

Ever so slightly pedantic if I may say so.  As stated above, pdf2swf was never 
intended to be an interactive flash player. The only way to get anywhere near
what you describe would be to combine player and rendererer on a frame by frame
basis, i.e.  process, snapshot, process, snapshot.  Here is a somewhat outdated 

Actually, this is something that could be achieved with swfc/actionscript 

> - What do you regard as a preview, e.g. always the first frame, or perhaps the
> first significant frame?

Personal opinion?  swfc/as2 gives you the choice to choose.

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

Yes. The Tags tell you all, if parsed properly.

> - Do you know where you have to click to get to the next frame?

Eh?  Are you talking about frames within frames, here?

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

In your opinion.. ;o)

( .. and how about posting an example of exactly what you do mean? )

On a slightly different note,  I found your blog entry on 'Re-Entrancy' quite 
entertaining.  So, with Gnash, one can now juggle as many balls as one likes,
and not drop any?  If I may say so, this doesn't sound like a feature, more like
the fix of a nasty bug!! :o)  [ humble non-programmer opinion there]

I've yet to get to grips with Gnash.  But intend testing some code with it 
Will happily see how many balls I can throw at it.. 



reply via email to

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