From: kramm Date: Mon, 13 Oct 2008 13:57:00 +0000 (+0000) Subject: bugfixes in Addbuttons script X-Git-Tag: release-0-9-0~906 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=fffa3792bb7fa347161847b51e4782eae16c5de8 bugfixes in Addbuttons script --- diff --git a/lib/modules/swfabc.c b/lib/modules/swfabc.c index 1ed86ee..8139af8 100644 --- a/lib/modules/swfabc.c +++ b/lib/modules/swfabc.c @@ -535,7 +535,7 @@ static void dump_method(const char*prefix, const char*type, const char*name, int dump_traits(prefix, c->traits, pool); printf("%s{\n", prefix); parse_code(c->tag, c->tag->len, pool,prefix2); - printf("%s}\n", prefix); + printf("%s}\n\n", prefix); } //#define DEBUG @@ -648,7 +648,7 @@ static void dump_traits(const char*prefix, dict_t*traits, abc_file_t*pool) } else if(kind == TRAIT_SLOT || kind == TRAIT_CONST) { // slot, const int slot_id = trait->slot_id; const char*type_name = dict_getstr(pool->multinames, trait->type_index); - printf(" %sslot %s %d %s (vindex=%d)\n", prefix, name, trait->slot_id, type_name, trait->vindex); + printf("%sslot %s %d %s (vindex=%d)\n", prefix, name, trait->slot_id, type_name, trait->vindex); } else { printf(" can't dump trait type %d\n", kind); } @@ -1490,22 +1490,18 @@ void swf_AddButtonLinks(SWF*swf, char stop_each_frame) abc_getlex(c, "[package]flash.system:Security"); abc_pushstring(c, "*"); abc_callpropvoid(c, "[package]:allowDomain", 1); - - //abc_getlocal_0(c); - //abc_constructsuper(c,0); - + if(stop_each_frame) { int i; for(i=0;ifirstTag; - int n = 1; while(tag) { if(tag->id == ST_DEFINEBUTTON || tag->id == ST_DEFINEBUTTON2) { char buttonname[80]; @@ -1525,21 +1521,17 @@ void swf_AddButtonLinks(SWF*swf, char stop_each_frame) abc_returnvoid(c); if(stop_each_frame) { - int i; - for(i=0;imax_stack = 3; - c->local_count = 1; - c->init_scope_depth = 10; - c->max_scope_depth = 11; - - abc_findpropstrict(c, "[package]:stop"); - abc_callpropvoid(c, "[package]:stop", 0); - abc_getlocal_0(c); - abc_pushscope(c); - abc_returnvoid(c); - } + c = abc_AddMethod(cls, 0, "[packageinternal]rfx:stopframe", 0); + c->max_stack = 3; + c->local_count = 1; + c->init_scope_depth = 10; + c->max_scope_depth = 11; + + abc_getlocal_0(c); + abc_pushscope(c); + abc_findpropstrict(c, "[package]:stop"); + abc_callpropvoid(c, "[package]:stop", 0); + abc_returnvoid(c); } tag = swf->firstTag;