A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: mouse over/active script (latest one available please)

  1. #1
    Senior Member
    Join Date
    Nov 2004
    Posts
    114

    mouse over/active script (latest one available please)

    hi there

    i always used photshop to slice my images and to create rollovers... now somebody told me this is old-fashioned, and can be done much "cleaner" in terms of coding...

    i cant use a simple div with only one mouse over image, coz i have 5 different buttons with different icons.

    Can somebody point me in the right direction....?

    regards
    emel.

  2. #2
    Senior Member
    Join Date
    Nov 2004
    Posts
    114
    hi there

    i think i found a good, "easy" way, but doesnt work quite how i want it to work. some advise would be great...

    i have two buttons, but if i do a mouse over on either one, they both appear in the mouse over state...... :/


    <html>
    <head>
    <script type="text/javascript">
    function mouseOver()
    {
    document.b1.src ="images/navi_02-over.gif"
    document.b2.src ="images/navi_03-over.gif"

    }
    function mouseOut()
    {
    document.b1.src ="images/navi_02.gif"
    document.b2.src ="images/navi_03.gif"

    }
    </script>
    </head>

    <body>
    <a href="http://www.w3schools.com" target="_blank">
    <img border="0" alt="Home" src="images/navi_02.gif" name="b1" width="217" height="191" onMouseOver="mouseOver()" onMouseOut="mouseOut()" /></a>

    <a href="http://www.w3schools.com" target="_blank">
    <img border="0" alt="Home" src="images/navi_03.gif" name="b2" width="200" height="191" onMouseOver="mouseOver()" onMouseOut="mouseOut()" /></a>

    </body>
    </html>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center