fixed some compiler warnings, fixed as3compile spec for-in.as
[swftools.git] / lib / as3 / scripts.c
index 8bcd9de..57b2da1 100644 (file)
@@ -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);
                     }