Moving a point above a line
René Micout
rene.micout at numericable.com
Mon Nov 16 07:06:22 EST 2009
Hello, this is my problem :
I have a line (grc "RacineTest2") and a "point" (grc "Mèche")
My goal is to move independently many "points" above many lines... So
the move command is not a solution because it stop a point during the
move of another point...
I have test 3 solutions : A = send in x milliseconds, C = wait 0
milliseconds and command, D = command without wait.
A and C are too slow (the speed must be adjust by a slider : very
fast, fast, slow, very slow, etc.), D is too fast (movement is
invisible and not adjustable by slider).
simplificated script (otherwise too long to be post)
global tableaudesPoints
on mouseUp
< here : creation of an array of all points of grc
"RacineTest2" (a line) named "tableaudesPoints" >
put 1 into lePoint
set the loc of grc "Mèche" to tableaudesPoints[lePoint]
déplacementMèche lePoint
end mouseUp
on déplacementMèche lePoint
if the commandkey is down then exit to top
put lePoint + 1 into lePoint
set the loc of grc "Mèche" to tableaudesPoints[lePoint]
-- send "déplacementMèche lePoint,diag" to me in 0 milliseconds
-- SOLUTION A
-- wait 0 milliseconds -- SOLUTION B
déplacementMèche lePoint,diag -- SOLUTION C (B+C) / SOLUTION D (C
only)
end déplacementMèche
Ideas ?
René
More information about the use-livecode
mailing list