Having a "invisible" layer on top of the page

Using Print2Flash Document API
Post Reply
koalit
Posts:1
Joined:Mon Mar 17, 2008 8:30 am
Having a "invisible" layer on top of the page

Post by koalit » Mon Mar 17, 2008 8:41 am

I'm currently looking at P2F, to be used in a corporate intranet.
We'd like to use P2F in a Flex application, where users would be able to view documents online. (no problem there).
Next thing is, that we want to enable those users to place annotation (like in Acrobat) in the documents.
So a user can view a page inside the Flex app using P2F, press a button and place a annotation/note on top of the page inside P2F (or it seems like that, could be on a invisible layer)

For that to work, I need to be able to read what coordinates the user clicked at, and also be able to maintain some kind of viewport, so the invisible layer matches the viewed area of the page.

Any ideas how and if this is possible using P2F (inside Flex that is)

Best regards,
Mark

staff
Posts:267
Joined:Sat Dec 15, 2007 4:48 pm

Re: Having a "invisible" layer on top of the page

Post by staff » Tue Mar 18, 2008 4:52 pm

You cannot do that directly from Flex. But you may write a Flash AS2 "wrapper" movie inside which you may load the Print2Flash document and develop your annotation support code in that movie in AS 2.0. You need to use an AS2 movie because there is a getPage Document API function available from there using which you can get a reference to any page movie object which is an instance of MovieClip class. Then you may determine movie position, dimensions, hook event handlers to it, etc. An example of handling page click events can be found here: http://print2flash.com/forum/viewtopic. ... &t=23&p=80 (it does not use getPage function though it is recommended to modify the sample to use it).

kholbrook
Posts:2
Joined:Tue May 20, 2008 4:26 pm

Re: Having a "invisible" layer on top of the page

Post by kholbrook » Wed May 21, 2008 4:04 pm

Why is this object (the page movieclip) not returned and available to Flex/AS3? Are the movieclip data types incompatible between AS2 and AS3?

And I'll ask again, even though I started a thread on this yesterday:
Any plans for an AS3 version of Print2Flash? If so, any ETA or features you can share?

Thanks,
K

Post Reply