using images to appear "animated"

I'm working on making a set of 11 images look like an "animation" using a new array, onmouseover/onmouseoff, and a timer. I want the guy to start "bouncing" on the mouse over, and to stop on the mouse off.

This is what I have, which doesn't even begin to work:

var jackhammers = new Array(11);
var timerID = bouncingOccurs;
var counter = 0;
var start;

jackhammers[0] = "jackhammer0.gif";
jackhammers[1] = "jackhammer1.gif";
jackhammers[2] = "jackhammer2.gif";
jackhammers[3] = "jackhammer3.gif";
jackhammers[4] = "jackhammer4.gif";
jackhammers[5] = "jackhammer5.gif";
jackhammers[6] = "jackhammer6.gif";
jackhammers[7] = "jackhammer7.gif";
jackhammers[8] = "jackhammer8.gif";
jackhammers[9] = "jackhammer9.gif";
jackhammers[10] = "jackhammer10.gif";

function bouncingOccurs()
if (bouncingOccurs)
bouncingOccurs = setInterval("bounceman()",90);

if (counter=11)
counter = 0;
counter = counter +1;
document.getElementsByTagName("theMan")[0].src = jackhammers[bouncingOccurs].src;

function mover(img)
document[jackhammers].src = theMan.src;
function mouseOut(img)
document[jackhammers].src = theMan.src;

Watch that Jackhammer Man GO!


Any ideas would be GREATLY appreciated!
And I apologize up front - I just started doing this and am totally clueless.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!