X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fscripts.c;h=57b2da1ab22a6bf8bf9a431a7dca7e4775088a98;hb=c63b2bf21dc1df9a736f0b4c08f6cba828cdab92;hp=33d48ad10b99c90174dc9d61e14df4b58e63449e;hpb=ccffa917cdf47a92f21c8789794028c30cbb5019;p=swftools.git diff --git a/lib/as3/scripts.c b/lib/as3/scripts.c index 33d48ad..57b2da1 100644 --- a/lib/as3/scripts.c +++ b/lib/as3/scripts.c @@ -31,7 +31,7 @@ void swf_AddButtonLinks(SWF*swf, char stop_each_frame, char events) int has_buttons = 0; TAG*tag=swf->firstTag; - void*md5 = init_md5(); + void*md5 = initialize_md5(); while(tag) { if(tag->id == ST_SHOWFRAME) @@ -47,8 +47,11 @@ void swf_AddButtonLinks(SWF*swf, char stop_each_frame, char events) unsigned char h[16]; unsigned char file_signature[33]; finish_md5(md5, h); - sprintf(file_signature, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10],h[11],h[12],h[13],h[14],h[15]); + sprintf((char*)file_signature, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", + h[0],h[1],h[2],h[3], + h[4],h[5],h[6],h[7], + h[8],h[9],h[10],h[11], + h[12],h[13],h[14],h[15]); char scenename1[80], scenename2[80]; sprintf(scenename1, "rfx.MainTimeline_%s", file_signature); @@ -174,7 +177,7 @@ void swf_AddButtonLinks(SWF*swf, char stop_each_frame, char events) __ findpropstrict(h,"flash.net::navigateToURL"); __ findpropstrict(h,"flash.net::URLRequest"); // TODO: target _blank - __ pushstring(h,oldaction->data); //url + __ pushstring(h,(char*)oldaction->data); //url __ constructprop(h,"flash.net::URLRequest", 1); __ callpropvoid(h,"flash.net::navigateToURL", 1); } else { @@ -183,7 +186,7 @@ void swf_AddButtonLinks(SWF*swf, char stop_each_frame, char events) __ pushstring(h, "link"); __ pushtrue(h); __ pushtrue(h); - __ pushstring(h,oldaction->data); //url + __ pushstring(h,(char*)oldaction->data); //url __ constructprop(h,"[package]flash.events::TextEvent", 4); __ callpropvoid(h,"[package]::dispatchEvent", 1); } @@ -255,7 +258,7 @@ void swf_AddButtonLinks(SWF*swf, char stop_each_frame, char events) __ popscope(c); __ popscope(c); __ popscope(c); - __ initproperty(c,"rfx::MainTimeline"); + __ initproperty(c,scenename2); __ returnvoid(c); //abc_method_body_addClassTrait(c, "rfx:MainTimeline", 1, cls);