X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fswfoutput.cc;h=75efd2c57b0dcecd11d6484850a29c6750827334;hb=1f237fb411319057ae1e4f779e511cea0e206858;hp=52f64ffb93f7b9ebf63dc12b99b04d31862282f7;hpb=3b6a15452be7b300bc7be5a7927b4b210e7cc732;p=swftools.git diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 52f64ff..75efd2c 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1137,13 +1137,11 @@ void swfoutput_linktourl(struct swfoutput*obj, char*url, swfcoord*points) if(textid>=0) endtext(); - actions = swf_ActionStart(); if(opennewwindow) - action_GetUrl(url, "_parent"); + actions = action_GetUrl(0, url, "_parent"); else - action_GetUrl(url, "_this"); - action_End(); - swf_ActionEnd(); + actions = action_GetUrl(0, url, "_this"); + actions = action_End(actions); drawlink(obj, actions, 0, points,0); } @@ -1156,10 +1154,8 @@ void swfoutput_linktopage(struct swfoutput*obj, int page, swfcoord*points) if(textid>=0) endtext(); - actions = swf_ActionStart(); - action_GotoFrame(page); - action_End(); - swf_ActionEnd(); + actions = action_GotoFrame(0, page); + actions = action_End(actions); drawlink(obj, actions, 0, points,0); } @@ -1172,19 +1168,15 @@ void swfoutput_namedlink(struct swfoutput*obj, char*name, swfcoord*points) if(textid>=0) endtext(); - actions1 = swf_ActionStart(); - action_PushString("/:subtitle"); - action_PushString(name); - action_SetVariable(); - action_End(); - swf_ActionEnd(); - - actions2 = swf_ActionStart(); - action_PushString("/:subtitle"); - action_PushString(""); - action_SetVariable(); - action_End(); - swf_ActionEnd(); + actions1 = action_PushString(0, "/:subtitle"); + actions1 = action_PushString(actions1, name); + actions1 = action_SetVariable(actions1); + actions1 = action_End(actions1); + + actions2 = action_PushString(0, "/:subtitle"); + actions2 = action_PushString(actions2, ""); + actions2 = action_SetVariable(actions2); + actions2 = action_End(actions2); drawlink(obj, actions1, actions2, points,1); @@ -1496,7 +1488,6 @@ int swfoutput_drawimagelossless256(struct swfoutput*obj, U8*mem, RGBA*pal, int s if(sizex&3) { /* SWF expects scanlines to be 4 byte aligned */ - printf("%d -> %d\n", sizex, BYTES_PER_SCANLINE(sizex)); int x,y; U8*ptr; mem2 = (U8*)malloc(BYTES_PER_SCANLINE(sizex)*sizey);