3 Replies Latest reply on Sep 9, 2006 6:14 AM by hoachen

    MouseOver image

    hoachen Level 1
      I am doing the mouseover to small image(left) and will display the big image on right. THe first image is working as i want but the second image is not working even though i use the same action but different name. Can anyone tell what and where i did wrong?

      http://www.testnewsite.com.websitetestlink.com/Untitled-6.swf
      AcTION SCRIPT1
      allpic.bigblkwhiteheadshotarmonshoulder._alpha = 0;
      _root.onEnterFrame = function() {
      if (allpic.hitTest(_xmouse, _ymouse, true)) {
      if (allpic.bigblkwhiteheadshotarmonshoulder._alpha<100) {
      allpic.bigblkwhiteheadshotarmonshoulder._alpha += 5;
      }
      } else if (allpic.bigblkwhiteheadshotarmonshoulder._alpha>0) {
      allpic.bigblkwhiteheadshotarmonshoulder._alpha -= 10;
      }
      };
      allpic.onRelease = function(){
      getURL(" ",_blank);
      }
      stop();

      AcTION SCRIPT2
      allpic2.big._alpha = 0;
      _root.onEnterFrame = function() {
      if (allpic2.hitTest(_xmouse, _ymouse, true)) {
      if (allpic2.big._alpha<100) {
      allpic2.big._alpha += 5;
      }
      } else if (allpic2.big._alpha>0) {
      allpic2.big._alpha -= 10;
      }
      };
      allpic2.onRelease = function(){
      getURL("",_blank);
      }
      stop();
        • 1. Re: MouseOver image
          Craig Grummitt Level 3
          i think you might be setting up _root.onEnterFrame twice. The second time you set it up, you replace the first one. you could either put the code for both onEnterFrames into one onEnterFrame, or you could set up onEnterFrame for the individual pics rather than _root eg. allpic.onEnterFrame = ....
          • 2. Re: MouseOver image
            hoachen Level 1
            Wow! it works. Thank you very very very much for you precious advices!!!..


            Cheer,
            hoachen
            • 3. Re: MouseOver image
              hoachen Level 1
              Now the above script is working good when mouseover and show the big image. My question is how can I change it to onClick instead of mouseover? The reason of change to onClick, the image will stay if the mouse is out, the mouseover is not really good if the people wants to print the big image. So, the click on picture and show the big image is more friendly :P

              Did any one know which line i should change it to, to make it onClick instead of mouseOver? Or any other way example that i can learn from.

              thank you for read my question

              Cheer
              hoachen