On Thu, Feb 17, 2011 at 9:34 PM, Michael Geary <[email protected]> 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/[email protected]/msg02757.html
>
> and this:
>
> 2) http://www.mail-archive.com/[email protected]/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