Function is not working

I have 6 pict. of a dog but the dog is not running

Page 1 of 1

1 Replies - 443 Views - Last Post: 24 November 2008 - 11:05 AM

#1 kschmidt  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 17-October 08

Function is not working

Post icon  Posted 24 November 2008 - 08:46 AM

The dog supposed to just run when you open the webpage????
[code]
<head>
<title>puppy</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859" />
<script type ="text/javascript">
/* <![CDATA[ */
var runPuppy;
var puppy = new Array (6);
var curPuppy = 0;
var imagesLoaded = 0;
for (var imagesLoaded =0; imagesLoaded < 6 ++ imagesLoaded) {
puppy[imagesLoaded] = new Image();
puppy[imagesLoaded].src ="puppy"
+ imagesLoaded + ".gif";
if (imagesLoaded == 5)
set Interval("run()",200);
function run () {
if (curPuppy == 5)
curPuppy = 0;
else
++curPuppy;
document.getElementsByTagsName("img")[0].src= puppy[curPuppy].src;

}

/* ]]> */
</script>
</head>
<body>
<p>
<img src="puppy0.gif" height="97" width="90" /></p>

</body>
</html>
[code]

Is This A Good Question/Topic? 0
  • +

Replies To: Function is not working

#2 kschmidt  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 17-October 08

Re: Function is not working

Posted 24 November 2008 - 11:05 AM

[font=Arial][size=7]
Never Minde, I got it
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1