Document is made in LiveCycle? Javascript field.somExpression returns xfa[0].form[0].root[0].#subform[6].TextSignature[0]. When trying to get field.x or field.y,rezult is 0in anyway. I think the reason is that the field is in XFA subform. Is there any way to attain real coordinates in my pdf document? Both javascript and C++ ways will be good. Really i need to register mouse click and define whether this click had occured in region of particular image in my XFA PDF form.
But if you really want to track mouse movements you'll need to play another game. First, PDF docs don't have general mouse events so you can't ever know in a generic way if the mouse button has been pushed. You can only know from a click event. The techique for simulating a generic mouse click is to place a button over the entire Page. Make the button transparent and normally invisible. Make it visible to do the click thing, and hide it of course on the click. To get coords of actual elements you can use the "layout.x()" and "layout.y()" fucntions.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script