HighDots Forums  

how to block the value of a variable?

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss how to block the value of a variable? in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris
 
Posts: n/a

Default how to block the value of a variable? - 07-22-2005 , 08:32 AM






Hi,

I want to show pictures each 5 seconds, so i define first the present time:

tempsreel= new Date()
trh=tempsreel.getHours()
trm=tempsreel.getMinutes()
trs=tempsreel.getSeconds()
te=parseInt(trh)*3600+parseInt(trm)*60+parseInt(tr s)

Now i calculate 5 seconds further:
nte=te+5

Finally, the new picture must appear five seconds later, but i can't compare
"te" with "nte" because the difference will always be 5. What i want is to
block the value of "nte", so when the real time equals "nte", then next
picture ...

Any idea how?
Thanks
Chris





Reply With Quote
  #2  
Old   
Jasen Betts
 
Posts: n/a

Default Re: how to block the value of a variable? - 07-31-2005 , 03:44 AM






In article <4O2dndSAK9qxZX3fRVnygw (AT) scarlet (DOT) biz>, Chris wrote:
Quote:
Hi,

What i want is to
block the value of "nte", so when the real time equals "nte", then next
picture ...

Any idea how?
why not just use a timeout of 5 seconds.

example timeout at this URL.

http://www.jsworkshop.com//http://ww.../list13-2.html

Quote:
Thanks
Chris





--

Bye.
Jasen


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.