change of icon(image) states

Results 1 to 2 of 2

Thread: change of icon(image) states

  1. #1
    Join Date
    Dec 1969

    Default change of icon(image) states

    Hi, I would like to make the following effect for my hp. a list of icons displayed, when the mouse cross over it change to one set od color, in the normal time its is another color. I did this using 2 sets of images under dreamweaver. But i want to make all the icons dim first(i.e. another set of images used) when the hp is loaded. then i click a particular one and then they will all change back to the normal effect i mentioned up there with 2 set of images. can anyone help? thanks~

  2. #2
    Join Date
    Dec 1969

    Default RE: change of icon(image) states

    It&#039;s fairly straightforward because you are talking about two different events: onmouseover & onclick. Use a global variable to tell the onmouseover event handler whether it can start yet, and to tell the onclick handler whether to stop now.<BR><BR>In pseudo code:<BR><BR>has_been_clicked = false<BR><BR>function do_mouseover() {<BR> if(has_been_clicked) {<BR> do my rollover<BR> }<BR>}<BR><BR>function do_fade_up_images() {<BR> if(!has_been_clicked) {<BR> swap my images to full colour version<BR> has_been_clicked = true<BR> }<BR>}<BR><BR>event handlers:<BR>onmouseover = do_mouseover()<BR>onclick = do_fade_up_images()

Posting Permissions

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