X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Fswf.c;h=614b2250f47f8e4b7172d034698f789925c8e78f;hb=0d0018bb20748de8a38d5791bd08a307e2a421d9;hp=126d53bbfe5c74be358ca95e7c44daa75f6b4d9b;hpb=3bb13bf276c06169f1ed0c03a8e253b2e30d1a0c;p=swftools.git diff --git a/lib/devices/swf.c b/lib/devices/swf.c index 126d53b..614b225 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -1106,6 +1106,7 @@ void gfxdevice_swf_init(gfxdevice_t* dev) i->swf->movieSize.ymin = 0; i->swf->movieSize.xmax = 0; i->swf->movieSize.ymax = 0; + i->swf->fileAttributes = 9; // as3, local-with-network i->swf->firstTag = swf_InsertTag(NULL,ST_SETBACKGROUNDCOLOR); i->tag = i->swf->firstTag; @@ -1450,17 +1451,17 @@ void* swfresult_get(gfxresult_t*gfx, const char*name) if(!strcmp(name, "swf")) { return (void*)swf_CopySWF(swf); } else if(!strcmp(name, "xmin")) { - return (void*)(swf->movieSize.xmin/20); + return (void*)(ptroff_t)(swf->movieSize.xmin/20); } else if(!strcmp(name, "ymin")) { - return (void*)(swf->movieSize.ymin/20); + return (void*)(ptroff_t)(swf->movieSize.ymin/20); } else if(!strcmp(name, "xmax")) { - return (void*)(swf->movieSize.xmax/20); + return (void*)(ptroff_t)(swf->movieSize.xmax/20); } else if(!strcmp(name, "ymax")) { - return (void*)(swf->movieSize.ymax/20); + return (void*)(ptroff_t)(swf->movieSize.ymax/20); } else if(!strcmp(name, "width")) { - return (void*)((swf->movieSize.xmax - swf->movieSize.xmin)/20); + return (void*)(ptroff_t)((swf->movieSize.xmax - swf->movieSize.xmin)/20); } else if(!strcmp(name, "height")) { - return (void*)((swf->movieSize.ymax - swf->movieSize.ymin)/20); + return (void*)(ptroff_t)((swf->movieSize.ymax - swf->movieSize.ymin)/20); } return 0; } @@ -1621,6 +1622,8 @@ void swfoutput_linktourl(gfxdevice_t*dev, const char*url, gfxline_t*points) actions = action_End(actions); drawlink(dev, actions, 0, points, 0, url); + + swf_ActionFree(actions); } void swfoutput_linktopage(gfxdevice_t*dev, int page, gfxline_t*points) { @@ -1647,6 +1650,8 @@ void swfoutput_linktopage(gfxdevice_t*dev, int page, gfxline_t*points) sprintf(name, "page%d", page); drawlink(dev, actions, 0, points, 0, name); + + swf_ActionFree(actions); } /* Named Links (a.k.a. Acrobatmenu) are used to implement various gadgets @@ -1779,6 +1784,7 @@ static void drawlink(gfxdevice_t*dev, ActionTAG*actions1, ActionTAG*actions2, gf i->swflastx = i->swflasty = 0; drawgfxline(dev, points, 1); swf_ShapeSetEnd(i->tag); + swf_ShapeFree(i->shape); /* shape2 */ myshapeid2 = getNewID(dev); @@ -1802,6 +1808,7 @@ static void drawlink(gfxdevice_t*dev, ActionTAG*actions1, ActionTAG*actions2, gf i->swflastx = i->swflasty = 0; drawgfxline(dev, points, 1); swf_ShapeSetEnd(i->tag); + swf_ShapeFree(i->shape); if(!mouseover) {