- abc_getlex(c,":MyButton1");
- abc_getlex(c,"flash.events:MouseEvent");
- abc_getproperty(c, ":CLICK");
- abc_getlex(c, ":gotoPage1");
- abc_callpropvoid(c, ":addEventListener" ,2);
-
- abc_getlex(c,":MyButton2");
- abc_getlex(c,"flash.events:MouseEvent");
- abc_getproperty(c, ":CLICK");
- abc_getlex(c,":gotoPage2");
- abc_callpropvoid(c,":addEventListener",2);
- abc_returnvoid(c);
-
-
- c = abc_AddMethod(cls, 0, "[packageinternal]buttonmitlink_fla:frame1", 0);
- c->max_stack = 3;
- c->local_count = 1;
- c->init_scope_depth = 10;
- c->max_scope_depth = 11;
+ tag = swf->firstTag;
+ int n = 1;
+ while(tag) {
+ if(tag->id == ST_DEFINEBUTTON || tag->id == ST_DEFINEBUTTON2) {
+ char buttonname[80];
+ char functionname[80];
+ sprintf(buttonname, ":button%d", swf_GetDefineID(tag));
+ //sprintf(functionname, ":clickLink%d", swf_GetDefineID(t));
+ sprintf(functionname, ":clickLink1");
+ abc_getlex(c,buttonname);
+ abc_getlex(c,"flash.events:MouseEvent");
+ abc_getproperty(c, ":CLICK");
+ abc_getlex(c,functionname);
+ abc_callpropvoid(c, ":addEventListener" ,2);
+ }
+ tag = tag->next;
+ }