PDA

View Full Version : Mouse cursor and trailing



gjoaquin
06-29-2005, 08:55 AM
Is there a way to make the custom cursor script and the image trailing script or any other script of the sort work simultaneously? it seems that i can only make just one of them at a time. If i try to include both scripts in my code the cursor would change, however, the image would not follow it. :confused:

jscheuer1
06-29-2005, 09:18 AM
Below are the stock answers to this type of question. I might add that we strongly suggest you also provide a link to the scripts in question and a link to the page you are having trouble with. In general, it probably is possible, as custom cursor can be applied directly through style (no script required) the image trailing scripts just create elements that follow the cursors coordinates according to various algorithms and whatnot. Custom cursor is an IE5+ only effect though.

.

Aside from the tutorial above which usually is the solution when the problem is two different scripts, you may need to consult:

http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=0&TOshow=allshow#refcon

Which explains how two scripts on the same page may not use the same set of variable names, id names, etc. This is especially important if the problem is two copies of the same script on a page.

One other approach that works in both situations is to put one script in a borderless iframe. It will look like it is on the same page but, since it really is on a separate page, conflicts are no longer an issue.

gjoaquin
06-29-2005, 10:52 AM
Turns out its either i posted the script for the trailing images wrong or there was some fault in the code which i highly doubt. in any case what i did was use another script and for the custom cursor i put it under the body tag instead of the head tag which worked fine for me! :p

djm
07-28-2005, 09:38 PM
Hi Guys

I am a new member of the dynamic drive forums and I need some help.

The reason for this message is in response to the above post titled 'Mouse cursor and trailing':

I noticed John was very helpful in his response and I was wondering if anyone would be so kind as to help my with a similar dillema that I am having with JavaScript...

Basically I have created a website and I have employed a menu system using javascript (along with other javascripts in the same page.) These all work fine but when I attempt to incorporate a mouse trailer javascript code, it simply does not work as there seems to be a conflict with the other javascript scripts in the webpage, whereas the other scrips work fine.

I tried the above links and the tutorial provided by jscheuer1 in this post but they do not apply to me as I am not using an onLoad script within the body tag of my webpage. (except onLoad=set() to display the date)

My question is in regard to the following quote:

QUOTE

One other approach that works in both situations is to put one script in a borderless iframe. It will look like it is on the same page but, since it really is on a separate page, conflicts are no longer an issue.

UNQUOTE

My question therefore is:

How can I get the javascript coding in the IFRAME of my webpage to work / execute on all other pages? As the javascript seems to be executed in the IFRAME only and not the main page where I want it to work. Bascially the mouse trailer now works in the IFRAME and not the main page of the website so I want to 'pull' in the javascript from this IFRAME into the main pages of the website so that there will no longer be a conflict of scripts as the IFRAME is on a separate page technically.

I thought you guys would be the best to ask this question, as you all seem to know your stuff.

Any answer to this question or help on solving this would greatly be appreciated.

Kind Regards

DJM