| Java menu knowledge base XIXL - TIMER command
All commands in the command entry are executed one after the other until
no further commands are left to execute. By default, the commands are
executed immediately after each other. However, in the Pro applets, you can set a delay between
each command execution - and also reset this delay later during the
command execution.
TIMER:2000 (also written TIMER=2000) sets a delay of 2000 milliseconds (2 seconds).
So, for example, the following drives a slide show on the HTML page with each image
showing for 5 seconds.
"SCRIPT:document.image.src='images/city.jpg'; TIMER:5000; SCRIPT:document.image.src='images/field.jpg'; SCRIPT:document.image.src='images/snow.jpg'; SCRIPT:document.image.src='images/river.jpg'; SCRIPT:document.image.src='images/hill.jpg'; SCRIPT:document.image.src='images/lake.jpg'; SCRIPT:document.image.src='images/dummy.gif'"
NB1: note that this must be written on one line in the index file - line-breaks are not permitted.
NB2: you can use the TIMER command as many times in the list of commands as you wish - i.e.
you can reset the delay time at will.
|
|