Hi Nicolas,

what you would need to do to make it accurate on all machines is calculate the 
value for the arcangle as it *should* be at the current time stamp. 
that way it might look a bit jerky on slower machines, though I doubt that 
would be noticeable. I am afraid I´ll need to blow my own horn here, so
*toot* *toot* You can do this with a timer using AEs easing functions.

The following script will always last 1800 millisecs (+- 40 millisecs, but 
those are neglectible)

on mouseUp
   local tDuration
   put 1800 into tDuration
   setArcAngle the milliseconds,tDuration
end mouseUp

on setArcAngle pSecs,pDuration
   local tElapsed,tAngle
   lock screen
   put the millisecs - pSecs into tElapsed
   put aeEaseIn(0,360,pDuration,tElapsed,1) into tAngle
   set the arcAngle of grc "circle" to round(tAngle)
   unlock screen
   if tAngle<360 then 
      if "setArcAngle" is not in the pendingmessages then
         send "setArcAngle"&&pSecs,pDuration to me in 40 millisecs
      end if
   else
      set the arcAngle of grc "circle" to 360
   end if
end setArcAngle

All the best,

Malte_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to