MouseMove . . . err?
revolution at derbrill.de
Mon Dec 15 14:20:02 CST 2008
Yippieh! I may post again thanks Heather :)
Sorry I am latre for the party, but somehow my mail bounced. Just
wanted to throw in a snippet.
Thanks for mentioning AE Nicolas. :)
Tom: With AE in use, constraining on any line is a one liner.
set the constrainLinear of btn "myButton" to 100,100,200,100
And here is what I think Richmond wanted (although I am never too sure
I get you right Richmond), also it is not half as cool as lemmings by
Master Scott <g>
A stack with 5 buttons: start, x1,x2,x3,x4
In a button "start":
set the flag of me to not the flag of me
put 15 into speed
-- play with the value of speed
put the ux of btn "x1",the uy of btn "x1" into tStart
put (item 1 of the mouseLoc-the uX of btn "x1")/speed + the uX of
btn "x1" into newX
put (item 2 of the mouseLoc-the uY of btn "x1")/speed + the uY of
btn "x1" into newy
set the uX of btn "x1" to newX
set the uY of btn "x1" to newY
set the loc of btn "x1" to newx -40,newy-40
set the loc of btn "x2" to newx +40,newy-40
set the loc of btn "x3" to newx +40,newy+40
set the loc of btn "x4" to newx -40,newy+40
if the flag of me then
send "checkmouse" to me in 30 milliseconds
Click the button to make x1,x2,x3,x4 follow with a nice little easing
effect. Click again to stop.
Maybe I´ll get around to generalize something like this for the next AE.
Malte (happy to get through again)
CEO derbrill Multimedia
CTO awesome mega mighty games
Steuernummer: 28 015 03865
Tel: +49 4331 337 977 7
email: info at derbrill.de
malte at awesomemegamightygames.com
More information about the use-livecode