replace mouse

serge's icon

hello,

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.

1601.dessin.maxpat
Max Patch
MIB's icon

only had a brief look at your patch. it seems to me that the "move x y" is your problem. you have a [pak move 0 0] going to a [prepend set] going to a message. well, since you use the "set" message that will only set the message but not send it!! so get rid of the message box and the prepend object and go directly from [pak 0 0] to the jsui. that should do the trick.
good luck.

serge's icon

Thank you for your answer. It was very helpful, but now max crash after some actions. i don't know why. Tank's a lot!

serge's icon

Hello,

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.

1610.dessin.maxpat
Max Patch
serge's icon

help me please....

Emmanuel Jourdan's icon

Your touch and move function should probably look like this:

function touch(x,y)
{
    onclick(x,y);
}

function move(x,y)
{
    ondrag(x, y);
}