Teddy5292
04-24-2004, 05:49 PM
I'm mostly good with html and kinda javascript dumb. :buckt: I was wondering if someone could email me the exact code to put a cursor in my site that says "Potter for Prez Mall" PLEASE HELP
|
View Full Version : Trailing Text Cursor:( Teddy5292 04-24-2004, 05:49 PM I'm mostly good with html and kinda javascript dumb. :buckt: I was wondering if someone could email me the exact code to put a cursor in my site that says "Potter for Prez Mall" PLEASE HELP donnamarie 04-24-2004, 06:05 PM Sorry, can't e-mail you, but here is the code. Where you put your text is in the middle of the head part, in bold. Put this part in the head section of your page. <style> .spanstyle { position:absolute; visibility:visible; top:-50px; font-size:10pt; font-family:Verdana; font-weight:bold; color:black; } </style> <script> /* Cursor Trailor Text- By Peter Gehrig (http://www.24fun.ch/) Permission given to Dynamicdrive.com to feature script in it's archive. For full source code, installation instructions, and 1000's more DHTML scripts, visit http://dynamicdrive.com */ var x,y var step=20 var flag=0 // Your snappy message. Important: the space at the end of the sentence!!! var message="DYNAMIC DRIVE! " message=message.split("") var xpos=new Array() for (i=0;i<=message.length-1;i++) { xpos[i]=-50 } var ypos=new Array() for (i=0;i<=message.length-1;i++) { ypos[i]=-50 } function handlerMM(e){ x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY flag=1 } function makesnake() { if (flag==1 && document.all) { for (i=message.length-1; i>=1; i--) { xpos[i]=xpos[i-1]+step ypos[i]=ypos[i-1] } xpos[0]=x+step ypos[0]=y for (i=0; i<message.length-1; i++) { var thisspan = eval("span"+(i)+".style") thisspan.posLeft=xpos[i] thisspan.posTop=ypos[i] } } else if (flag==1 && document.layers) { for (i=message.length-1; i>=1; i--) { xpos[i]=xpos[i-1]+step ypos[i]=ypos[i-1] } xpos[0]=x+step ypos[0]=y for (i=0; i<message.length-1; i++) { var thisspan = eval("document.span"+i) thisspan.left=xpos[i] thisspan.top=ypos[i] } } var timer=setTimeout("makesnake()",30) } </script> Put this part in the body section <script> <!-- Beginning of JavaScript - for (i=0;i<=message.length-1;i++) { document.write("<span id='span"+i+"' class='spanstyle'>") document.write(message[i]) document.write("</span>") } if (document.layers){ document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = handlerMM; // - End of JavaScript - --> </script> Teddy5292 04-24-2004, 06:06 PM Oh thank You very much i will try this and see how it works donnamarie 04-24-2004, 06:08 PM glad I could help :) Teddy5292 04-24-2004, 06:09 PM Maybe im doing something wrong but i cannot get it to work donnamarie 04-24-2004, 06:10 PM hmmm, just a sec, let me check..... edit: go to http://www.dynamicdrive.com/dynamicindex13/trailortext.htm donnamarie 04-24-2004, 06:11 PM go to http://www.dynamicdrive.com/dynamicindex13/trailortext.htm Teddy5292 04-24-2004, 06:13 PM When i used to do it it would mess everything up, now it does nothing and i am not sure how to change it? I am using angelfire and have seen such cursors on angelfire sites before donnamarie 04-24-2004, 06:14 PM used to do what? Did you try the code on that site? I have never used that host before. sry. Teddy5292 04-24-2004, 06:19 PM used to do what? Did you try the code on that site? I have never used that host before. sry. Yes i tried the code before but it used to just ruin my whole site stargrl329 04-24-2004, 07:48 PM Perhaps you could post a link to your page? Teddy5292 04-24-2004, 08:18 PM Ok here it is (http://angelfire.com/wizard2/potterforprez/guildmall) :cloud: Its a neopets related site for my guild. But it is not on neopets Teddy5292 04-24-2004, 08:20 PM Its a neopets related site for my guild. But it is not on neopets |