PDA

View Full Version : Swap image on mouseDown instead of MouseOver


Arc
03-13-2003, 04:51 PM
Is it possible to swap images when someone clicks down on an image and then switch back when the let go of the button? Basically making it act like a standard button. Well i guess obviously it's possible since the regular buttons do it, but how hard is it? Anyone have some code to do it?


Thanks!:D

beetle
03-13-2003, 04:58 PM
Just take a regular rollover script and chage 'onmouseover' to 'onmousedown' and 'onmouseout' to 'onmouseup' !!

Arc
03-13-2003, 05:30 PM
ahh cool hehe. I didnt know there was an onmousedown and onmouseup event. Thanks!:D

beetle
03-13-2003, 05:40 PM
Events

http://msdn.microsoft.com/workshop/author/dhtml/reference/events.asp
http://www.mozilla.org/docs/dom/domref/dom_event_ref33.html#1000062