como mover / deslizar uma imagem da esquerda para a direita
Eu quero deslizar ou mover uma imagem da esquerda para a direita algo como em
http://rajeevkumarsingh.wix.com/pramtechnology
A caixa pentagonal de leitura que se move Ok!
Eu tentei um pouco, mas não conseguiu fazer isso eu usei os códigos abaixo
<script type="text/javascript">
<!--
var imgObj = null;
var animate ;
function init(){
imgObj = document.getElementById('myImage');
imgObj.style.position= 'absolute';
imgObj.style.top = '240px';
imgObj.style.left = '-300px';
imgObj.style.visibility='hidden';
moveRight();
}
function moveRight(){
if (parseInt(imgObj.style.left)<=10)
{
imgObj.style.left = parseInt(imgObj.style.left) + 5 + 'px';
imgObj.style.visibility='visible';
animate = setTimeout(moveRight,20); // call moveRight in 20msec
//stopanimate = setTimeout(moveRight,20);
}
else
stop();
f();
}
function stop(){
clearTimeout(animate);
}
window.onload =init;
//-->
</script>
<img id="myImage" src="xyz.gif" style="margin-left:170px;" />
Há algum tipo de problema de resolução com o Firefox e o IE também. Como resolvê-los Também não sou capaz de mover as coisas tão claramente. Isso é possível ou não? Eu quero que seja com javascript e não flash.