swftools-common
[Top][All Lists]
Advanced

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

[Swftools-common] Tools for direct SWF manipulation.


From: David E. West
Subject: [Swftools-common] Tools for direct SWF manipulation.
Date: Tue, 20 Jan 2004 20:59:31 -0500

Hello,

I hope this question is on topic.  I'm rather new to the swf format.  I've 
looked at a lot of swf tools and find the swftools suite to be quite useful.
I have not been able to find a tool to allow me to directly manipulate an SWF
file, though.  Lots of tools let you extract and view data.  Some tools let you
generate SWF complient files based upon some abstract meta language, but what 
I'm looking for is a tool that will let me manipulate an existing SWF file on 
a data object level.  Something that I can use to not only extract various data
objects, but to insert data objects as well.

For example, I found a swf file online that I like, but I want to replace some
of the images in it in order to customize it.  I could decompose the whole 
thing and build it back I suppose, but really all I want to do is replace one 
embedded jpeg and two embedded png images with alternates.  I've looked over 
the SWF spec and I see how to do it on a binary level, but it would be a pain 
to have to do this with a hex editor and that would be tedious and error prone.

Finally, my questions are:

(1) Is there a tool in swftools that will allow this sort of direct object-
    level swf manipulation?

(2) Does anyone know of any free/open source tools that will do this sort of 
    thing?

What I envision is something like the following:

-------------------------------------------------------------------------------
Usage: swfinsert [-t TagID] [-c CharID] [-f DataFile] file.swf
Usage: swfremove [-t TagID] [-c CharID] file.swf

        -t                     Tag ID of data object.  Can be specified in
                               either decimal, oct, hex, or by name such as 
                               "DefineBitsJPEG2".
        -c                     Character ID of data object.  Can be specified
                               in either decimal, oct, or hex.
        -f DataFile            File containing data to be inserted.

When inserting, if an object exists with the id given by <CharID>, then it is
replaced.  (Perhaps with a warning or something.)

Eventually these commands might be enriched to include more details of the
swf semantics.
-------------------------------------------------------------------------------

Or would something like the above be more complicated than I'm currently
thinking.  I looked through the specs and didn't see anything like checksums
inter-object linkages.  In fact the spec says that objects should not contain
references that go outside their bounds, so that the objects can be completely
modular and reordered if neccessary.  So it would seem to me that object-level
manipulation of these swf "archives" should be relatively straight forward.

I hope my query is not too far off topic.  Feel free to redirect me to a more
appropriate message board.

Thanks,

David E. West




reply via email to

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