I have a java script which I would like to write using motools so that
I can use it in another script I am writing.

//Countdown Timer Script
                window.onload = function()
                {
                        num = document.getElementById('left');
                        fps= 40;
                        seconds = 60;

                        var total = fps*seconds;
                        for(var i=total;i>=0;i--)
                        {
                                var delayed = (function()
                                {
                                        var step = 1-i/total;
                                        var left = Math.ceil(i/fps);
                                        return function()
                                        {
                                                num.innerHTML=left;
                                        };
                                })();

                                setTimeout(delayed,-1000/fps*(i-total));
                        }
                }

Issue is I don't know how I should work with this
"setTimeout(delayed,-1000/fps*(i-total));". To the best of my
knowledge there is no setTimeout function in mootools. Please help!

Reply via email to