replace mouse

Dec 27, 2010 at 1:23pm

replace mouse


i’m sorry, i don’t speak english very well
it’s an urgent message

I would like to replace the function of the mousse in the java code to use only two number box (x,y). But I don’t understand what thing I must change in the java code to do it.

Thank you for your help.

  1. dessin.maxpat
Dec 30, 2010 at 2:33pm


I need help.
I don’t understand why the patch crash when I change the brush.
I think that maybe the function “move” is the reason of the crash.

Thank a lot for some informations.

  1. dessin.maxpat
Jan 4, 2011 at 3:33pm

help me please…

Jan 4, 2011 at 5:00pm

hello serge,

the draw function, you have to call is ondrag.

but first, you have to remove the following line inside the javascript code:
ondrag.local = 1;

local functions cant be called from outside.

then you should be able to draw with
[pak ondrag 0 0]


Jan 4, 2011 at 7:02pm

Hello donkey,

Thank’s a lot for your answer.
I have followed all of your indications, but now when I draw anything appears. The drawing is visible when I do
“cmd E”. It’s extrange. When I change the brush the drawing doesn’t start and I must click into the window to finally be able to draw. How could I draw just automatically, without clicking into the window?

Thank you very much for your help


Jan 5, 2011 at 2:43pm

hello serge,

if you want to start a new draw, you have to send a onclick x y message to the js.
be sure, that you have deleted or disabled the line:
onclick.local = 1;

i have attached a smal version where you also can change the brush without crash.

hope it helps.


You must be logged in to reply to this topic.