对象中setInterval的有关问题

对象中setInterval的问题function A() {this.bBthis.b(1)this.afunction() {this.bulletnew Bullet()

对象中setInterval的问题


function A() {
this.b=B;
this.b(1);

this.a=function() {
this.bullet=new Bullet();
window.setInterval('this.bullet.run()', 100);
}
}


Bullet是一个类。
bullet是在B类中的,run方法没有问题,是测试过的。
问题是现在setInterval以后并不会执行。
我的意思就是这个程序这样的,请问应该怎么写?
[解决办法]

function A() {
this.b=B;
this.b(1);
this.a=function() {
this.bullet=new Bullet();
var t = this;
window.setInterval(function(){
t.bullet.run();
}, 100);
}
}