Click to See Complete Forum and Search --> : custom cursor on click.


supasye
07-01-2007, 10:14 AM
hi, i have already got a custom cursor, and another custom cursor over links. i intend to have two more custom cursors, one for click anywhere on the screen, and one for a click on a link. i want the cursor to change back to the original one once the left mouse button is released. i cant do it! ive been at it all day.

if anyone could help that would be fantastic. i have pasted the code i have written for the custom cursors up until now.


thanks!


____________________________________________


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>


<style>
<!--
BODY{
cursor:url("lime.cur");s
background-color: #F7FFE1;
margin-top: 0px;
margin-bottom: 0px;
}
a:link {
color: #7ECE17;
cursor:url("lime2.cur");
}
a:visited {
color: #7ECE17;
cursor:url("lime2.cur");
}
a:hover {
color: #588D10;
cursor:url("lime2.cur");
}
a:active {
color: #7ECE17;
cursor:url("lime2.cur");
}

-->
</style>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SML</title>
</head>



<body>
</body>
</html>

ray326
07-01-2007, 03:21 PM
That would be the :active selector.

WebJoel
07-01-2007, 06:01 PM
<!--
BODY{
cursor:url("lime.cur");s
background-color: #F7FFE1;
margin-top: 0px;
margin-bottom: 0px;
} is this a typo? If so, it needs to not be there.

supasye
07-02-2007, 06:44 AM
sorry i dnt know how that got there..

anyway, sorry im a bit retarded when it comes to programming..

so this :active selector.
would it be something like:


a:active selector {
color: #7ECE17;
cursor:url("lime2.cur");
}


no i just tested it and it didnt work..... :/



??

ray326
07-02-2007, 12:38 PM
No, it's just a:active, which indicates the mouse button is depressed on an anchor. Your styles above make no difference in presentation for anything but :hover.

supasye
07-02-2007, 03:30 PM
i see, thats worked now, sort of..

is there a way of doing it when i click anywhere on the screen..

i'll explain exactly what im trying to achieve:
my website is squishmylime.com. so i though id have it so that whenever the user clicked the lime would squish.
with the :active selector, the cursor changes and remains changed over the selected link.

if i was to go further, i was thinking of having an animated cursor, so that when the left mouse button is clicked anywhere on the screen, the animated cursor comes on, and when the animation finishes it would turn back to the original cursor.


am i wishing for too much?

ray326
07-02-2007, 09:46 PM
You'd be better off doing it with Javascript mouse event handlers.