Jump to content

ProgramPotato

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by ProgramPotato

  1. Below is code I have for a slideshow:

     <div id="thepic" valign="center"><input type="image" src="ArrowLeft.png" value="<" onclick="move('down')" id="left"/><input type="image" src="ArrowRight.png" value=">" onclick="move('up')" id="right"/></div><input type="image" src="Stop.png" value="stop" onclick="pause()" id="stop" /><script type="text/javascript">var pics=["Placeholder.png", "Placeholder.png", "Placeholder.png", "Placeholder.png"];pics.unshift(pics.pop())function move(dir){if(timer){clearTimeout(timer)}if(dir=="down"){pics.unshift(pics.pop())} if(dir=="up"){pics.push(pics.shift()) }timer=setTimeout(function (){move(dir)}, 5000)document.getElementById("thepic").style.backgroundImage="url("+pics[0]+")";}var timer=setTimeout(function (){move("up")}, 5000) function pause(){clearTimeout(timer);}</script></div>

    I was wondering if there is a way to get a fading effect in between pictures, so it looks cleaner. What i really want is an effect like on iOS devices when you slide from picture to picture. I've seen both of these done before and I'd like to have this effect. Thanks!

×
×
  • Create New...