Ask Experts Questions for FREE Help!
 

Free Answers in 3 Easy Steps

Register Now
3 Steps
 


Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.
  Answer this question    Ask about Other Scripting    Ask about another Subject  
 

aneelbakshi
Mar 7, 2007, 12:50 AM
how i can use setInterval
i know
1 second=1000 millisecond
but i m confuse that how
10 fps==100 milliseconds
explain

Capuchin
Mar 7, 2007, 12:53 AM
The time between frames is the inverse of frames per second

\frac{1000 milliseconds}{10 fps} = 100 milliseconds

In other words, each of the 10 frames are on for 100 milliseconds, which has to add up to a total time of 1 second

10*100 = 1000milliseconds, which is a second.

Capuchin
Mar 7, 2007, 01:07 AM
Hi, as you are still confused I will try again.

You have 10 frames per second.

This means 10 frames in every second.

To work out the time for each frame, you need to split up the second into equal amounts.

Because you have 10 frames per second, you need to split the second up into 10 equal amounts.

this is done by division: \frac{1 second}{10 frames per second} = 0.1 seconds for each frame, this is 100 milliseconds using the conversion that you say you understand.