Need help! Need to make interactive button from GIF images

Discussion in 'Scripts' started by pipars2009, Aug 27, 2009.

  1. #1
    Hey!

    Could anybody help me with finding the right solution- I do need script for to create a interactive button from 3 GIF images (mouseon/ mouseoff/ mousedown/ mouseup).

    Please, give some hints- how to handle that!!!
     
    pipars2009, Aug 27, 2009 IP
  2. gavo

    gavo Active Member

    Messages:
    123
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    70
    #2
    gavo, Aug 27, 2009 IP
  3. pipars2009

    pipars2009 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks mate!

    Just another question- if I want to create an interactive button- first I create a script for image that will be displayed in browser like;

    <img border="0" src="../../CDR%20buttons/About%20us/About%20us.gif"
    width="140" height="89"><p align="center">

    and then I make: a script which displays remaining 2 images for mouseover and mousedown? I've tried several ways- none of them work! Here's a sample of what I did:

    <img border="0" src="file:///C:/Documents%20and%20Settings/Valters/Desktop/WEB/CDR%20buttons/About%20us/About%20us.gif"
    width="140" height="89" onmouseover="this src="../../CDR%20buttons/Home/Home2.gif"
    onmouseout="this src="../../CDR%20buttons/Home/Home.gif" alt="image"/>

    What exactly is wrong and how to make it right?

    Please help!
     
    pipars2009, Aug 28, 2009 IP
  4. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #4
    You don't really need 3 images to do a mouseover just 2. Try this:

    In your <head> tags:

    <SCRIPT LANGUAGE = "JavaScript">
    <!--
    first=new Image
    first.src="image1.jpg"

    second=new Image
    second.src="image2.jpg"
    // --></SCRIPT>

    Where you want the link:

    <a href="javascript:void(0)"
    OnMouseOut="monitor.src=first.src"
    OnMouseOver="monitor.src=second.src">
    <img src="image1.jpg" name="monitor" width="300" height="375" border="0"></a>
     
    scottlpool2003, Sep 1, 2009 IP