Jump to content

phate

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by phate

  1. phate

    Will this work?

    Thanks for the link. I'll try that first as it's more likely to work than what I did . Will the code I did not work? I assume not because the links code looks alot more complex.
  2. phate

    Will this work?

    I think I can't use the Onload event in an image tag. If that's the case could I just put this in the body?<script type="text/javascript">silk = 1pic = new Array ("name1.jpg","name2.jpg","name3.jpg")a = setTimeout ("document.sw.src = "pic[0]"",1000)b = setTimeout ("document.sw.src = "pic[1]"",1000)c = setTimeout ("document.sw.src = "pic[2]"",1000)while (silk=1){abc}</script>
  3. I want to create an animation and have just read a bit on javascript and came up with this. I don't have the jpg files yet so haven't been able to test it. Does it look like it would work? I want each jpg to play for 1 second then go onto the next one and when the last jpg is shown I want it to start again by showing the first jpg. I'll have lots of jpgs but have only shown it with 3 here.I know I don't really need the array but i've put it in anyway.<head><script type="text/javascript">function functionname()silk = 1pic = new Array ("name1.jpg","name2.jpg","name3.jpg")a = setTimeout ("document.sw.src = "pic[0]"",1000)b = setTimeout ("document.sw.src = "pic[1]"",1000)c = setTimeout ("document.sw.src = "pic[2]"",1000)while (silk=1){abc}</script></head><body><img src="name1.jpg" name="sw" onload=functionname()/></body>
×
×
  • Create New...