swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Swftools-common] pdf2swf - one movieclip per image


From: Bas Horsting
Subject: RE: [Swftools-common] pdf2swf - one movieclip per image
Date: Fri, 24 Oct 2008 09:23:42 +0000

Excellent, thanks!
 
In the end I got it to work like this:
 

int mcid = getNewID(dev);

i->tag = swf_InsertTag(i->tag, ST_DEFINESPRITE);

swf_SetU16(i->tag, mcid); //id

swf_SetU16(i->tag, 1); //frames

msg("<verbose> Placing image, shape ID %d, bitmap ID %d, mc ID %d", myshapeid, bitid, mcid);

 

i->tag = swf_InsertTag(i->tag,ST_PLACEOBJECT2);

swf_ObjectPlace(i->tag,myshapeid,1,0,0,0);

i->tag = swf_InsertTag(i->tag, ST_END);

 

i->tag = swf_InsertTag(i->tag, ST_PLACEOBJECT2);

CXFORM cxform2 = gfxcxform_to_cxform(cxform);

swf_ObjectPlace(i->tag,mcid,getNewDepth(dev),&i->page_matrix,&cxform2,NULL);
 
 
Cheers,
 
Bas





> Date: Fri, 24 Oct 2008 08:51:48 +0200
> From: address@hidden
> To: address@hidden
> Subject: Re: [Swftools-common] pdf2swf - one movieclip per image
>
> On Thu, Oct 23, 2008 at 10:22:33PM +0000, Bas Horsting <address@hidden> wrote:
> > I'm having this particular need for pdf2swf to generate a movieclip
> > inside the generated SWF for / around every image inserted, so I can
> > later access / make invisible / replace these images by accessing the
> > resulting SWF through ActionScript. Would it be very difficult to
> > build this in?
>
> If you're somewhat fluent in C/C++, it's not very difficult.
>
> > How would I proceed to implement this?
>
> Try the following:
>
> In line 2225 of lib/devices/swf.c, change the code
>
> msg("<trace> Placing image, shape ID %d, bitmap ID %d", myshapeid, bitid);
> i->tag = swf_InsertTag(i->tag,ST_PLACEOBJECT2);
> CXFORM cxform2 = gfxcxform_to_cxform(cxform);
> swf_ObjectPlace(i->tag,myshapeid,getNewDepth(dev),&i->page_matrix,&cxform2,NULL);
> to
> msg("<trace> Placing image, shape ID %d, bitmap ID %d", myshapeid, bitid);
> int mcid = getNewID(dev);
> i->tag = swf_InsertTag(i->tag, ST_DEFINESPRITE);
> swf_SetU16(i->tag, mcid);
> i->tag = swf_InsertTag(i->tag,ST_PLACEOBJECT2);
> CXFORM cxform2 = gfxcxform_to_cxform(cxform);
> swf_ObjectPlace(i->tag,myshapeid,1,&i->page_matrix,&cxform2,NULL);
> i->tag = swf_InsertTag(i->tag, ST_END);
> i->tag = swf_InsertTag(i->tag, ST_PLACEOBJECT2);
> swf_ObjectPlace(i->tag,mcid,getNewDepth(dev),0,0,0);
>
> Greetings
>
> Matthias
>
>
>
>



Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]