albino_pygmy
08-15-2015, 05:12 AM
I'm trying to figure out if there's a way to tweak this code to make my wheel spin a little more smoothly, or if it's just my laptop not being able to handle the code? The code works, it's just really laggish for me and the wheel appears to be very jumpy. On the plus side, I do like how it will stay within one of three spots on a wedge, avoiding landing on a line. Is there a way to keep that functionality (landing in one of those three spots) but make the wheel actually look like it's spinning all the time, and not partially and choppy?
Sub RndSpin(oShp As Shape)i = ActivePresentation.SlideShowWindow.View.CurrentShowPosition
Set oShp = ActivePresentation.Slides(i).Shapes("WheelGroup")
t = Timer + (Rnd * 5) + 5
Do Until Timer > t
oShp.Rotation = oShp.Rotation + 5
DoEvents
Loop
End Sub
Sub RndSpin(oShp As Shape)i = ActivePresentation.SlideShowWindow.View.CurrentShowPosition
Set oShp = ActivePresentation.Slides(i).Shapes("WheelGroup")
t = Timer + (Rnd * 5) + 5
Do Until Timer > t
oShp.Rotation = oShp.Rotation + 5
DoEvents
Loop
End Sub