Nathan,

have a look at the MouseTracker class in the Simulator project of 
qooxdoo-contrib
http://qooxdoo-contrib.svn.sourceforge.net/viewvc/qooxdoo-contrib/trunk/qooxdoo-contrib/Simulator/trunk/source/class/custom/MouseTracker.js?view=log

It's very little code but maybe just what you're looking for. Have a 
look in the Application.js file in the same directory to see the usage 
(these lines are commented out). If used that way it will open a small 
box and displays the current mouse coordinates in real time. If you have 
problems using the code let me know.

Cheers,
Thomas


Nathan Taylor wrote:
> I need the position of the Mouse on the document body because I am 
> trying to spawn an object on the cursor.
>
> Thank you,
> Nathan
>
>
>
> ------------------------------------------------------------------------
> > Date: Mon, 25 Feb 2008 20:27:18 -0500
> > From: [EMAIL PROTECTED]
> > To: qooxdoo-devel@lists.sourceforge.net
> > Subject: Re: [qooxdoo-devel] Mouse Position X,Y
> >
> > On Mon, Feb 25, 2008 at 4:57 PM, Nathan Taylor <[EMAIL PROTECTED]> wrote:
> > >
> > > Could someone please tell me the quickest way to get the X,Y 
> coordinates of
> > > my mouse? I know the MouseEvent getPageX() and getPageY() exposes this
> > > information, but I am unsure how to get a MouseEvent from the 
> document.
> >
> > Hi Nathan,
> >
> > Are you absolutely sure that you want a mouse event from the DOCUMENT
> > and not from some particular widget? Do you really care where the
> > mouse is all of the time, or only when it's over some particular
> > widget?
> >
> > The general mechanism is to call widget.addEventListener(eventType,
> > functionToCall). In your case, eventType is probably "mousemove" or
> > "mousedown" or "mouseup" or "click" or "dblclick" or maybe evben
> > "mouseout" or "contextmenu". You likely want the object on which you
> > addEventListener (widget) to be the widget highest in the hierarchy:
> > the one with the smallest scope that is of interest.
> >
> > Derrell
> >
> > 
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > qooxdoo-devel mailing list
> > qooxdoo-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to