thanks Chris also ....
  ----- Original Message ----- 
  From: Jason 
  To: [email protected] 
  Cc: David Croft 
  Sent: Tuesday, December 28, 2010 2:43 AM
  Subject: Re: [Swftools-common] (patch supplied) New utility swfassets


  Dear all

  I found another solution that doesn't invlove patching... May be useful for 
anyone )like me) who can't even find the intsall folder, let alone run the risk 
of changing anything in it !)

  Using swfdump, I get a list of all the data concerning the swf, then search 
for the moment any clips are put (PLACEOBJECT) and can then get the name string
  In my example I am just looking for clips with a specific name string, but 
you could extract all clips with names this way.

  Hoping this helps someone somewhere.

  BTW Matthias, it is a BIG compliment to SWFTools that in less than a day I am 
already extracting the clips I want, resizing, moving and then rebuilding the 
SWF.
  Amazing tool

  Best

  Jason


   $idAr = array();
          $data=array();
           $command = "swfdump    example.swf";
          $return_var=0;
          $s=exec($command,$data,$return_var);

         for ($i = 0 ; $i < sizeof($data); $i++ ) {
          //IF PLACEOBJECT and is a clip we need
          if (strrpos($data[$i] , "PLACEOBJECT") && strrpos($data[$i] , 
"contentClip")) {
              array_push($idAr,(int)substr($data[$i], strrpos($data[$i] , 
"places id")+10, 4));
              }
         }
         //idAr now contains the ID of the clips we need, in the order we need 
(assuming swfdump always dumps them in index order !
                 //    print_r ($idAr);
    //extract all
          $output = array();
          for ($i = 0 ; $i < sizeof($idAr); $i++ ) {
            $command = "swfextract -i " . $idAr[$i] ." adExample.swf -o clip". 
$i .".swf;";
                  $return_var=0;
          $s = exec($command, $output, $return_var);
          }

  On 28/12/2010 10:04, Jason wrote: 
    Hi David

    Thanks for the reply...
    The part I need to change is the references to
    'swftools-2009-08-24-2042-orig'
    Can't figure out what to change it to... swftools seems to be in 
/usr/local/bin
    But I see no src directory...

    Any pointers ?

    Thanks

    Jason


    On 28/12/2010 03:53, David Croft wrote: 
      Hi Jason, 


      I haven't had reason to use swftools since I made this patch, but from 
looking at the swftools changelog, it doesn't look like it has been added yet.


      You should be able to download the patch and do "patch -p0 < 
swftools-swfassets.patch", though it may need a few tweaks since I did the 
patch against SVN version 2042.


      
http://www.mail-archive.com/[email protected]/msg04556/swftools-swfassets.patch


      Anything further, I suggest asking on the mailing list because I only 
used swftools briefly.


      Regards,


      David



      On 27 December 2010 14:58, Jason <[email protected]> wrote:

        Hi David

        This patch looks like just the thing I need...
        I was wondering if this has been added. And if so, how to access the 
asset instance name in the current version of SWFTools ?
        If not, I need to install the patch... am on Unix. Any hints ?

        Thanks

        Jason





        Re: [Swftools-common] (patch supplied) New utility swfassets

------------------------------------------------------------------------
              From:  Matthias Kramm 
              Subject:  Re: [Swftools-common] (patch supplied) New utility 
swfassets 
              Date:  Sun, 6 Dec 2009 13:42:15 -0800 
              User-agent:  Mutt/1.5.20 (2009-06-14) 

------------------------------------------------------------------------

On Mon, Nov 30, 2009 at 08:52:02PM +0100, David Croft <addr...@hidden> wrote:
> swfextract lists the available IDs for extraction but not their asset
> name. While swfdump does present this information, it does not do so
> in a machine readable format. Thus it is quite hard to extract an
> asset by name from an SWF, or to conversely to associate a name with
> an extracted ID.
> 
> The attached new utility "swfassets" will dump, in a machine readable
> format, the asset name, ID, and type of each exported asset (one per
> line, tab separated values). This can then be used to determine the ID
> to pass to swfextract.

David, thanks for the patch. Sorry for the late follow-up, I haven't had a
chance to peek into this list for a while.
I'll add something like this to one of the next versions- albeit
probably as an extension to 
    swfextract file.swf
which displays information about which items are extractable.

Matthias





Reply via email to