function oneShotSprite(sid,anim){
	this.anim = anim
	this.image = document.createElement("IMG")
	this.image.style.position = "absolute"
	this.image.style.posLeft = -100
	this.image.style.posTop = -100
	this.x = -100
	this.y = -100
	this.image.src = anim[0]
	this.inanim=false
	this.frames = anim.length
	this.frame = 0
	this.put = putAnim
	this.run = animate
	this.start = startaction
	this.stop = stopaction
	document.body.appendChild(this.image)
	function putAnim(px,py){
		this.image.style.posLeft = px
		this.image.style.posTop = py
	}
	function animate(){
		this.frame++;
		if(this.frame > this.frames){
			this.frame=1;
			this.image.src=this.anim[this.frame-1]
			this.stop()
			this.put(-100,-100)
			this.inanim = false
		}
		else	this.image.src=this.anim[this.frame-1];
	}
	function startaction(f,t,px,py){
		if(!this.inanim){
			this.put(x,y)
			this.inanim = true
			var func = f + ".run()"
			this.iTimer = setInterval(func,t)
		}
	}
	function stopaction(){
		clearInterval(this.iTimer)
	}
}
