Bond, думаю, вот так лучше будет:
var Bullet = (function() {
function Bullet() {
this.element = document.getElementById('transline');
this.bullet = document.createElement('li');
this.left = 0;
this._play = this.play.bind(this);
this.element.appendChild(this.bullet);
}
Bullet.prototype.play = function() {
this.left += 4;
this.bullet.style.left = this.left + 'px';
if(this.left >= 1000) {
this.remove();
}
else {
this._timeoutID = setTimeout(this._play, 10);
}
};
Bullet.prototype.remove = function() {
this.stop();
this.bullet.remove();
};
Bullet.prototype.restart = function() {
this.stop();
this.play();
},
Bullet.prototype.stop = function() {
this.left = 0;
clearTimeout(this._timeoutID);
};
return Bullet;
}());
var bullet = new Bullet;
bullet.play();