OK sorry !
i just understand that i must write "==" to compare !
my fist step in javascript ...:)
yanomano
Le 7 mai 05 à 23:25, JeanMarcNoël a écrit :
somebody can help me ?
I want to set the position of a sprite with mouse :
1/ on mouse clic the sprite take the position of the mouse
2/ on mouse release clic the sprite stay in the new position
i try to find a patch to do that (sort of switch) but no success.
so i plug the x position of a mouse controler in the inputs[o] ,
and the output of left button on
the inputs [1] of a javascript patch and write this basic
javascript :
if ( inputs[1] = 1 )
{
outputs[0] = inputs[0]
}
but the sprite is definitly traking the mouse with or without
mouse clic...
i'am not a code guru...just a javascript french newbie...