This is a discussion on "Button animation help!!" within the JavaScript Forum section. This forum, and the thread "Button animation help!! are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Button animation help!!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Button animation help!!
Hey
I've got a web page that contains links. I've found a script I can use to make the links change color when the mouse is over. The page is: www.laasanen.net/alina/paasivu.html One of the links contain script which is the red one. As you can see it turns grey when the mouse is over it. The script I'm using is: <html> <head> <script type="text/javascript"> function mouseOver() { document.b1.src ="b_blue.gif" } function mouseOut() { document.b1.src ="b_pink.gif" } </script> </head> <body> <a href="http://www.w3schools.com" target="_blank" onmouseover="mouseOver()" onmouseout="mouseOut()"> <img border="0" alt="Visit W3Schools!" src="b_pink.gif" name="b1" width="26" height="26" /></a> </body> </html> I'm having trouble making using this code at least twice on the same page. How is this done? The thing that happens for me is that the next link I make does not change color when the mouse is over it but the first link I made, which is now seen on the web page, changes color, even though the mouse is over the other link. I hope this made sense at all. I really need help. I guess the question is that how do I use this script on several links o the same page?? -Al Last edited by Allu; Jul 25th, 2006 at 07:39. |
|
|
|
|||
|
Re: Button animation help!!
From the code you have shown, the relationship between the link and the script is the bit I have highlighted.
Your function calls from within each link need to pass a variable that uniquely identifies that link so the script knows which one to operate on. |
|
|||
|
Re: Button animation help!!
iv used something like this befor but it was to blure thelinks not change the color try this code anyware on your site and it will work for all you links
|
![]() |
| Tags |
| button, animation, help |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| etoxin>> Funky Flash site some really funky interactive animation. Animation to play | etoxin | Free Web Site Critique | 33 | Jan 17th, 2008 12:39 |
| I need help with a basic button animation! | uzilover | Flash & Multimedia Forum | 1 | Sep 10th, 2007 19:04 |
| making a button animation complete | Toby1979 | Flash & Multimedia Forum | 4 | Jul 8th, 2007 21:14 |
| Animation on the Web | Diablo | Introduce Yourself | 5 | Sep 22nd, 2005 21:54 |
| When a button refuses to behave like a button in Flash | autumn_whispers2me | Flash & Multimedia Forum | 2 | May 24th, 2005 22:08 |