Lunarpages Web Hosting Forum

Author Topic: Need help trying to get 2 scripts to work on the page  (Read 1037 times)

Offline summersong

  • Space Explorer
  • ***
  • Posts: 6
Need help trying to get 2 scripts to work on the page
« on: January 06, 2004, 05:37:20 PM »
I have a circling text trail on my page.  I want to add script for a top navigation menu; but when I do, the cursor trail no longer works.  I know there's a conflict, but can't seem to resolve it.   Can anyone help?  Many thanks.

The scripts are:

Navigation loaded in <BODY>:

<script language="JavaScript" src="../menu2.js"></script>
<script language="JavaScript" src="../menucontext2.js"></script>
<script language="JavaScript">
<script language="JavaScript">
function UpdateIt(){
if (ie&&keepstatic&&!opr6)
document.all["MainTable"] = document.body.scrollTop;
setTimeout("UpdateIt()", 200);

Cursor trail loaded in <HEAD>:

<SCRIPT LANGUAGE="JavaScript1.2">

//Circling text trail- Tim Tilton
//Visit for this script and more

// your message here

var font='Arial';
var size=3; // up to seven
var color='#D9E6DC';

// This is not the rotation speed, its the reaction speed, keep low!
// Set this to 1 for just plain rotation w/out drag
var speed=.3;

// This is the rotation speed, set it negative if you want
// it to spin clockwise
var rotation=.2;

// Alter no variables past here!, unless you are good

var ns=(document.layers);
var ie=(document.all);
var msg=msg.split('');
var n=msg.length;
var a=size*15;
var currStep=0;
var ymouse=0;
var xmouse=0;
var scrll=0;
var props="<font face="+font+" size="+size+" color="+color+">";

if (ie)

// writes the message
   if (ns){
   for (i=0; i < n; i++)
      document.write('<layer name="nsmsg'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+msg+'</font></center></layer>');
   if (ie){
      document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
      for (i=0; i < n; i++)
         document.write('<div id="iemsg" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center;font-weight:regular;cursor:default">'+props+msg+'</font></div>');

function Mouse(evnt){
   ymouse = (ns)?evnt.pageY+20-(window.pageYOffset):event.y; // y-position
   xmouse = (ns)?evnt.pageX+20:event.x-20; // x-position

if (ns||ie)
y=new Array();
x=new Array();
Y=new Array();
X=new Array();
for (i=0; i < n; i++){

function makecircle(){ // rotation properties
if (ie);
   for (i=0; i < n; i++){ // makes the circle
      var d=(ns)?document.layers['nsmsg'+i];*Math.sin((currStep+i*1)/3.8)+window.pageYOffset-15;
      d.left=x+a*Math.cos((currStep+i*1)/3.8)*2; // remove *2 for just a plain circle, not oval

function drag(){ // makes the resistance
   for (var i=1; i < n; i++){

   // not rotation speed, leave at zero

// -->

Offline Boris

  • Master Jedi
  • *****
  • Posts: 1010
Need help trying to get 2 scripts to work on the page
« Reply #1 on: January 11, 2004, 02:29:24 PM »
How does your <body> tag look like? Did you use a <body onload=""> function inside it?
Questions on graphics? Visit the lunarpages Graphics forum!

Bugging Danielle daily since 2003.

Have a Lunar Day!

Offline dragon6

  • Trekkie
  • **
  • Posts: 12
mouse trail
« Reply #2 on: June 04, 2004, 10:05:45 AM »
I have the same problem. Can anyone help??