Mouse X and Y position

Jun 17, 2012 at 12:47am

Mouse X and Y position

Hello everybody,
Can somebody help me with a doubt? So, I have a jit.window, how can I define X and Y coordinates for the mouse, so it can load a picture or movie when the mouse achieves X and Y values?

Jun 17, 2012 at 2:15am

the lcd object could help you, you can have it invisible over your jit.window and it will detect mouse clicks and mouse position. I hope this can get you started.

Jun 17, 2012 at 2:36am

Are there any example patches so I can take a look?

Jun 17, 2012 at 3:22am

I disagree with jbl. (I’m not sure how one would even do what he proposes, unless he’s referring to jit.pwindow rather than jit.window.) But jit.window (and jit.pwindow) already will send a ‘mouse’ message out the right outlet in response to mouse dragging in the window. Try dragging in the ‘MouseOnMe’ window in this example.

– Pasted Max Patch, click to expand. –
Jun 17, 2012 at 10:22am

Jbl is very confusing to me… I tried with your example but I think I am missing someting…
I am sorry, I am very new on Jitter.

  1. routemouse.maxpat
Jun 17, 2012 at 4:07pm

Your example suggests that you would benefit from studying the Jitter tutorials and the Max tutorials if you have not already done so. (Your patch contains some basic conceptual errors.) Meanwhile, here is an example that does what I imagine you might be trying to make happen; it plays the movie whenever the mouse is clicked in the lower right quadrant of the window.

– Pasted Max Patch, click to expand. –
Jun 18, 2012 at 6:25am

Hahaha I am so sorry! Christopher Dobrian is right.

Jun 19, 2012 at 1:30am

Thank you for the Patch!


You must be logged in to reply to this topic.