Mouse X and Y position

mpsantos's icon

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?

jbl's icon

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.

mpsantos's icon

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

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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.

mpsantos's icon

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.

4051.routemouse.maxpat
Max Patch
Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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.

jbl's icon

Hahaha I am so sorry! Christopher Dobrian is right.

mpsantos's icon

Thank you for the Patch!