+
+ abc_method_body_t*h =
+ abc_class_method(cls, "::void", functionname, 1, "flash.events::MouseEvent");
+ h->max_stack = 3;
+ h->local_count = 2;
+ h->init_scope_depth = 10;
+ h->max_scope_depth = 11;
+ abc_getlocal_0(h);
+ abc_pushscope(h);
+
+ ActionTAG*oldaction = swf_ButtonGetAction(tag);
+ if(oldaction && oldaction->op == ACTION__GOTOFRAME) {
+ abc_findpropstrict(h,"flash.net::gotoFrame");
+ int framenr = GET16(oldaction->data);
+ // FIXME: doesn't work yet
+ if(framenr>255) {
+ fprintf(stderr, "Warning: Couldn't translate jump to frame %d to flash 9 actionscript\n", framenr);
+ }
+ abc_pushbyte(h,framenr);
+ abc_callpropvoid(h,"flash.net::gotoFrame", 1);
+ } else if(oldaction && oldaction->op == ACTION__GETURL) {
+ abc_findpropstrict(h,"flash.net::navigateToURL");
+ abc_findpropstrict(h,"flash.net::URLRequest");
+ abc_pushstring(h,oldaction->data);
+ abc_constructprop(h,"flash.net::URLRequest", 1);
+ abc_callpropvoid(h,"flash.net::navigateToURL", 1);
+ } else if(oldaction) {
+ fprintf(stderr, "Warning: Couldn't translate button code of button %d to flash 9 abc action\n", id);
+ }
+ abc_returnvoid(h);
+ swf_ActionFree(oldaction);