Hi Emilio,

please excuse the shameless plug. If you´d use animationengine you would want to use something like the following script in the card (assuming one moving button called myButton and one oval graphic, called arc):

local tDragTime

on init
 set the loc of btn "myButton" to 400,400
 set the constrainRectangular of the btn "myButton" to the rect of this cd
end init

on constrainRectangularInit
 put the milliseconds into tDragTime
end constrainRectangularInit

on constrainrectangularCallBack
 if intersect(the target, grc "arc") then
   set the constrainElliptical of the target to \
   the loc of grc "arc",the width of grc "arc"/2,the height of grc "arc"/2
 end if
end constrainrectangularCallBack

on constrainEllipticalExit
 set the constrainElliptical of the target to empty
 answer the milliseconds-tDragTime
end constrainEllipticalExit

you would need to call the init method first. The button is placed at 400,400 then. Start dragging the button to the oval. Release the button and see the time.

Hope that helps,

Malte

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to