X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Fswf.c;h=94e4c36dd030da0d24e43ca9b75fa8f7ad849d80;hb=fd812e6f288b19810fd7cd9b1460b804784b4093;hp=51a1123d5b39443aa6ce9f8014073957fea4890b;hpb=644fa66941dd88b81b2e49638b73714224022c38;p=swftools.git diff --git a/lib/devices/swf.c b/lib/devices/swf.c index 51a1123..94e4c36 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -1390,7 +1390,7 @@ void swf_drawlink(gfxdevice_t*dev, gfxline_t*points, char*url) if(url[t]<'0' || url[t]>'9') nodigit = 1; if(!nodigit) { - int page = atoi(&url[4]) - 1; + int page = atoi(&url[4]); if(page<0) page = 0; swfoutput_linktopage(dev, page, points); } @@ -1435,13 +1435,14 @@ void swfoutput_linktopage(gfxdevice_t*dev, int page, gfxline_t*points) endtext(dev); if(!i->config_internallinkfunction) { - actions = action_GotoFrame(actions, page); + actions = action_GotoFrame(actions, page-1); actions = action_End(actions); } else { actions = action_PushInt(actions, page); //parameter actions = action_PushInt(actions, 1); //number of parameters (1) actions = action_PushString(actions, i->config_internallinkfunction); //function name actions = action_CallFunction(actions); + actions = action_End(actions); } drawlink(dev, actions, 0, points,0); @@ -1469,12 +1470,14 @@ void swfoutput_namedlink(gfxdevice_t*dev, char*name, gfxline_t*points) actions1 = action_PushInt(0, 0); //number of parameters (0) actions1 = action_PushString(actions1, &tmp[5]); //function name actions1 = action_CallFunction(actions1); + actions1 = action_End(actions1); } else { *x = 0; actions1 = action_PushString(0, x+1); //parameter actions1 = action_PushInt(actions1, 1); //number of parameters (1) actions1 = action_PushString(actions1, &tmp[5]); //function name actions1 = action_CallFunction(actions1); + actions1 = action_End(actions1); } actions2 = action_End(0); mouseover = 0;