diff options
author | kramm <kramm> | 2008-08-20 13:25:50 +0000 |
---|---|---|
committer | kramm <kramm> | 2008-08-20 13:25:50 +0000 |
commit | 89a0063cc15966a580e2a6a1db668e8348e6bd8b (patch) | |
tree | ff34e0f62edfee974c7bf81c3c179fa5019f5022 /lib/rfxswf.c | |
parent | 6778a872476db77a83e2885a22891fd3d32f1348 (diff) |
don't make files which contain AVM2 Actionscript AVM3
Diffstat (limited to 'lib/rfxswf.c')
-rw-r--r-- | lib/rfxswf.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/rfxswf.c b/lib/rfxswf.c index c03a997d..94346e41 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -1334,9 +1334,21 @@ int swf_WriteSWF2(writer_t*writer, SWF * swf) // Writes SWF to file, return } if(swf->fileVersion >= 9) { + TAG*tag = swf->firstTag; + U32 flags = 0x08; // | 128 = usenetwork, | 16 = hasmetadata | 8 = actionscript3 + while(tag) { + /* FIXME: this doesn't find actionscript in buttons */ + if(tag->id == ST_DOACTION || tag->id == ST_DOINITACTION) + has_version_8_action=1; + if(tag->id == ST_DOABC) + has_version_9_action=1; + tag = tag->next; + } + if(has_version_8_action && !has_version_9_action) + flags = 0x00; + if (swf->firstTag && swf->firstTag->id != ST_FILEATTRIBUTES) { - U32 flags = 0x8; // | 128 = usenetwork, | 16 = Actionscript3 | 8 = hasmetadata swf_SetU32(swf_InsertTagBefore(swf, swf->firstTag,ST_FILEATTRIBUTES),flags); } } |