hi all
very recently i got to work on this thing. The behaviour is weird. if I call setInterval function from my class method it wont give me the class variables.
but when i call that function individually it works ok.
here is the code.
function fnMain()
{
this._nIndex=0;
this._nInterval=null;
}
fnMain.prototype.callBack=function()
{
this._nInterval=setInterval(this.fnFrog,200);
}
fnMain.prototype.fnFrog=function()
{
trace(“index=”+this._nIndex);
}
var a=new fnMain();
//—when call this it traces undefined----\
a.callBack();
//—when calling this it traces _nIndex=0–\
//a.fnFrog();
i think someone will also face this problem in past and he/she can correct me where i was wrong. Thanx for ur replies.