Rotation Animation - Looping Spinner


#1

Not finding any relevant forum answers on this for RP 8 - I am trying to make a loping “Spinner” animation, like a loading wheel, but I can’t really figure out how to loop it more than once. Seems like this should be pretty easy in 8.


#2

Hi!

You could make each state of your animation a state in a dynamic panel. Then put this in the DP’s OnLoad handler

OnLoad
Set This to Next Wrap repeat every 50ms

The “wrap” here is the checkbox “Wrap from last to first”


#3

If it’s a static shape and you want a smooth rotation:
OnLoad
Rotate this widget by 360 degrees over 250ms
Wait 250s
Fire event: this widget OnLoad

Or if you want it stepped:
OnLoad
Rotate this widget by 60 degrees (replace with 360/number of steps you want)
Wait 100ms
Fire event: this widget

Tweak values as you desire.


#4

You can also loop the Rotation with the On Move Event:

On Load (or on Click on button):
Rotate Widget by 360 degrees over desired duration for initial rotation

On Move
Rotate Widget by 360 degrees over desired duration
Move this by 0, 0 to loop rotation


#5

But with the Fire Event action in 8.0 we could just fire the OnLoad event again and avoid the Move action and duplicating the Rotate action.


#6

I haven’t been much aware of the Fire Event functionality so far, pretty useful stuff. Thanks for pointing that out.


#7

This worked perfectly. Thank you!


#8

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)