setTimeout() problem

Hi there,

just wondering if anyone could assist me. I am using setTimeout() to call a function called “finished” after a 1000ms pause, which works absolutely fine until I try to pass a variable with it.

setTimeout(finished, 1000);

works absolutely fine.

endex_txt = "Well done";
setTimeout(finished(endex_txt), 1000);

calls the “finished” function, and passes the variable “endex_txt”, but there is no 1000ms delay, very strange! I can only think that I’ve formatted it wrong. If anyone has any ideas please let me know! I am using Flash CS3 Pro.

Thanks.