I have files name animation_00000.png
through to animation_00256.png
. I thought I would be able to simple loop through and load them to screen like this,
var animation = $("<img id='animtation' />");
animation.prependTo(".stage");
for(var i = 00000; i < 00276; i++)
{
animation.attr("src", "img/animations/cat/Catwalk_"+i+".png");
}
However this tries to load the image sources like this,
Catwalk_0.png
How can I make sure that all the zeroes are preserved in the count?