Does anyone know of a script that i could use on my site where a visitor could type their name into a form and generate an animated alphabet signature?
@vwphillipsAug 09.2005 — #what do you mean by animated
this is pritty naff [CODE] <html> <head> <style> .pic {background-color: #FF0000;} </style> <script>
var currImg = 0; var imgNum = 0; var Ary1=new Array();
function moveImg(_e){ if (imgNum<2){ return; } if(_e) { Ary1[currImg].style.top=_e.pageY; Ary1[currImg].style.left=_e.pageX+Ary1[currImg].os; } else { Ary1[currImg].style.top=event.y; Ary1[currImg].style.left=event.x+Ary1[currImg].os; } currImg=(currImg+1)%imgNum; }
function initImg(txt){ var i; for(i = 0;i < txt.length;i++) { Ary1[i]=document.createElement('DIV'); Ary1[i].style.position='absolute'; Ary1[i].style.width='50px'; Ary1[i].style.height='20px'; Ary1[i].os=(i*10+20); Ary1[i].appendChild(document.createTextNode(txt.charAt(i))); document.getElementsByTagName('BODY')[0].appendChild(Ary1[i]); } if (!document.all) document.captureEvents(Event.MOUSEMOVE) imgNum = Ary1.length; document.onmousemove=moveImg; }
function Animate(obj){ if (obj.value.length<2){ return; } for (i=0;i<Ary1.length;i++){ document.getElementsByTagName('BODY')[0].removeChild(Ary1[i]); } initImg(obj.value); }
</script> </head> <body> <center>Move your mouse - see the images move.</center>
function StartIt(p){ if (!document.all) return var loop = motor(p); if (window.time) {clearInterval(time)} if (k1 == text[s].length) { k1 = 0; v1 = 1; tel = 0; var time = setTimeout("StartIt(" +(p+1) + ")", Speed); }else { var time =setTimeout("StartIt(" +(p+1) + ")", 50); }
} //--> </script>
<font face="David" > <div ID="iDx"> </font></div>
<input type=text id=x value='Enter your name and Click "Okay"' size=40 onchange="text[0]='Your name is: '+this.value"> Okay </body> </html> [/CODE]
@JPnycAug 09.2005 — #If I understand what you're trying to do, the 1st thing you'd need is to have animated gifs for all the letters already. Then, you have to parse the contents of the text box to get individual characters, and you'll need to make an array of all 26 of the animated gifs, so that you can do a comparison with each character and pull the right gif for each letter. I'm sorry I don't have such a script written as an example.