Forum Moderators: open

Message Too Old, No Replies

Looking for a script that generates a natural spin effect

What generates a natural spin effect in AJAX/Javascript?

         

iMarketingGuru

11:53 pm on Feb 16, 2007 (gmt 0)

10+ Year Member



Back in the game Myst there was a virtual/page wheel effect seen in the game where the more force you placed on the drag of the cursor, the faster the wheel would spin. Are there any scripts capable of producing this same effect or are there any things programmed in ajax that can produce this effect?

Silvery

12:27 am on Feb 17, 2007 (gmt 0)

10+ Year Member



Can you describe the affect you're trying to achieve on a webpage, for those of us who cannot remember the effect you're referring to?

I played a game or two of Myst long ago, but I don't know what visual effect you're trying to describe.

In advance: I think what you're describing will likely end up requiring Flash in addition to Javascript, or else a whole lot of gif images plus Javascript.

rocknbil

7:23 pm on Feb 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Since the mouse in itself is not pressure sensitive, you might emulate this by a combination of setTimeOut() and building a "speed control" function. That is, in an onClick event, the object begins spinning at a certain rate, determined by a "start speed" you pass to setTimeOut(). So every start_speed milliseconds, the speed control function checks to see if the mouse is still down, if it is, it decrements the start_speed value and passes this to the animated object. When the mouse is released, it increments the value until it reaches start_speed again.

As for the object itself, not sure how I'd approach that, it can be an actual object you move via Javascript or easier yet, a Flash object that accepts input from the Javascript function.

Look up some "scrolling status bar" scripts, it's a similar concept.

iMarketingGuru

8:15 pm on Feb 18, 2007 (gmt 0)

10+ Year Member



Thank you guys, I didn't have a chance to respond but these ideas should help. This was information for my father and he's far too lazy to post the question himself. So, I will definitely let him know about this and give him more detail.

Thanks again