I used this function to put BE4.gif on the canvas but it doesn't animate and only shows the first frame of the .gif (it's an animated .gif, of course).
function func(){ var ImageCanvas=document.getElementById("canvas1");
if(!ImageCanvas.getContext){return;}
var context=ImageCanvas.getContext("2d");
var imgDraw=new Image();
imgDraw.onload=function(){context.drawImage(imgDraw,0,0);};
imgDraw.src="BE4.gif";
}
What can I do?