swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] revisiting AVM1 to AVM2 conversion


From: Ricardo Pedroso
Subject: Re: [Swftools-common] revisiting AVM1 to AVM2 conversion
Date: Fri, 18 Feb 2011 00:18:18 +0000

On Thu, Feb 17, 2011 at 9:34 PM, Michael Geary <address@hidden> wrote:
> hi folks,
>
> so, this is just killing me. I have found several references to the topic of 
> converting an AVM1 file to an AVM2 file, but i still have not been able to 
> nail this. I have read this:
>
> 1) http://www.mail-archive.com/address@hidden/msg02757.html
>
> and this:
>
> 2) http://www.mail-archive.com/address@hidden/msg05977.html
>

I think I know what is happening.

When you do:
swfdump some-avm2.swf

will will get after the header something like:

[045]         4 FILEATTRIBUTES as3

in some-avm1.swf you will have or not (FILEATTRIBUTES tag is only
mandatory to swf >= 8):

[045]         4 FILEATTRIBUTES


When swfcombine detects that there is actionscript 2 (AVM1) than will
"refuse" to set the as2 bit
on FILEATTRIBUTE tag.

It probably worked before swftools 0.9.0


You can foul swfcombine with a dirty hack.

Just comment this piece of code in lib/rfxswf.c, around line 1655:

            if(has_version_8_action && !has_version_9_action)
                flags &= ~FILEATTRIBUTE_AS3;


and now you can do:
swfcombine -d -F9 avm1.swf -o avm2.swf

Be aware that avm2.swf still can contains actionscript2, but will be
ignored by the player.

> So, i'm going crazy here.

Hope not :)

Ricardo



reply via email to

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