"Lasse Reichstein Nielsen" <lrn@hotpop.com> wrote in message
news:65k1xa93.fsf@hotpop.com...[color=blue]
> "Richard A. DeVenezia" <radevenz@ix.netcom.com> writes:
>[color=green]
> > Is some future Mozilla going to support setInterval ([/color][/color]
<function:function>,[color=blue][color=green]
> > <interval:number> ) ?
> > Right now it seems to be simply setInterval ( <function-text:string>,
> > <interval:number> )[/color]
>
> It works fine with a function.
>
> Just try
> setInterval(function(){alert("foo");},2000);
> (and be ready to close the window in one of the breaks).
>
> /L
> --
> Lasse Reichstein Nielsen -
lrn@hotpop.com
> Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
> 'Faith without judgement merely degrades the spirit divine.'[/color]
This is a 'simplified' version of what I thought wasn't working, but dangit,
it works.
function foo (N1) {
function bar (N2) {
this.liftOffIn (N2)
}
bar.prototype.liftOffIn = function (N3) {
this.N = N3
var thisobj = this
this.timerId = setInterval ( function () { thisobj.count() }, 1250 )
}
bar.prototype.count = function () {
if (this.N<1) {
alert ('Done')
clearInterval (this.timerId)
return
}
alert (this.N)
this.N--
}
new bar (N1)
}
foo (5)
--
Richard A. DeVenezia