well, for starters your call the setTimeout tells it to execute after
waiting one second (1000 milliseconds)

setTimeout("code",<time in ms>);

so, try changing:
setTimeout('ampli('+(inc+1)+')',1000)
to:
setTimeout('ampli('+(inc+1)+')',10)

(one second (1000ms) devided by 100 = .1 seconds (10ms)

----- Original Message -----
From: "Lluis Casany" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 16, 2001 3:02 AM
Subject: [Dynapi-Help] It doesn't work properly setTimeout() width DynDuo2?


I have a function that i'd like tu run over 100 time every second. I'm
trying to use the setTimeout but it doesn't work properly. I'm thinking that
may it doesn't work becouse the DynDuo2.

Do u have any idea what could happen?

<>

function ampli(inc) {
if(!inc) {
inc = 100;
}
if(inc<=200) {
magnify100.setSize(magnifyW*inc/100,magnifyH*inc/100);
setTimeout('ampli('+(inc+1)+')',1000)
} else {
alert('finish')
}
};


thanks in advance.

Lluís Casany.


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help


---
Outgoing mail is certified Virus Free by AVG Free Edition
http://www.grisoft.com/html/us_index.cfm
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to