Jump to content

Recommended Posts

Posted

Hi,All

 

I want to make a menu like below for the VLE we use. Which as you move your cursor over Images 1, 2 and 3 it changes X to a different Image and then back to a default Image once the cursor is not on any of them. I’ve tried in Flash and Dreamweaver with no success. I need some sort of JavaScript I think. someone help Please :help:.

 

 

LOGO XXXXXXXXXXXXX

LOGO XXXXXXXXXXXXX

LOGO XXXXXXXXXXXXX

11111 22222 33333333

Posted

Flash will do it, create the basic shape of your button and then convert it to a symbol button. Double clicking on that symbol will allow you to edit the button, You will the have 4 states of the button up over down and hit

 

The Four Button States

Up

The appearance of the button when the pointer is not over it.

 

Over

The appearance of the button when you place the pointer over it.

 

Down

The appearance of the button when you click on it.

 

Hit

Defines the area that will respond to a click of the mouse.

 

Just gotta have a play.:)

Posted (edited)

I think the following will do the trick

 



<br />
function SwapImg(ImageName, ImageLocation)<br />
{<br />
  document[imageName].src = ImageLocation;<br />
}<br />



Test 1

Test 2

Test 3




image1.jpg

Edited by Pashers
  • Thanks 1
Posted

That won't work, because the image will not reset when the mouse leaves the link. Try something like this.

 




   Javascript Menu
   <br />
        //<br />
        //  Set the Logo Image to the required state<br />
        //<br />
        function SetLogo(name) {<br />
            var e = document.getElementById("menuImage");           // Get the element with the ID 'menuImage'<br />
            e.src = name;                                           // Set its src attribute to the required value<br />
        }<br />
    


   
   logo.gif
   default.gif
   


    

   Image 1 here
   Image 2 here
   Image 3 here


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...