Hah, answered my own question. I wrote a little indefiniteSpin widget, and
redefined the animation's specific step method (backgroundPosition in my
case).

The nuts and bolts are that when the final background position had been
specified by the service calls, $.fx.step.backgroundPosition needed to reset
fx.end, fx.options.curAnim.backgroundPosition, and fx.options.duration. Much
hairy math is involved, but it seems to work great.

w00t!

-eh


eharman wrote:
> 
> I'm trying to write a simple slot machine widget. When a user clicks a
> button, 3 "wheels" with the usual icons "spin", and eventually come to
> rest at various random positions. Very easy. However here's the trick: I
> need to wait for a service call to return before allowing the wheels to
> stop spinning, as the response determines where the wheels stop.
> 
> I realize I could wait until the call returned before even starting the
> wheels spinning, but if the call takes more than a split second the user
> will notice the delay, which would be irritating. So my ideal goal is to
> start spinning the wheels indefinitely, make the call, get the response,
> and update the wheels' animation to slow down and stop at position x.
> 
> Any clever ways to use & abuse jquery to achieve this?
> 
> Thanks!
> -eh
> 

-- 
View this message in context: 
http://old.nabble.com/changing-animation-end-position---duration-mid-flight-tp26881485s27240p26883292.html
Sent from the jQuery UI Discussion mailing list archive at Nabble.com.

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.


Reply via email to