17 Replies Latest reply: Mar 6, 2012 1:10 AM by andersonOllie RSS

    Mouseover highlight not aligned to shape

    andersonOllie Community Member

      Hi guys,

       

      I'm sure i'm missing something painfully obvious (i hope anyway) but it's driving me mad.

      I have 3 buttons (on this example), each has a mouseover so the button will highlight once the mouse enters the shape. This all works, however the mouseover area seems to be aligned half OFF of the shape.

      EG the shape will highlight when hovering off of the shape on one side, and from half way accross the shape on the other.

       

      Here are some grabs and the general code i have.

       

       

      Hover Help 1.jpgHover Help 2.jpg

      for(var x = 1; x < 4; x++)

      {

       

       

                      var currentBut = eval("but"+x);

       

       

                      currentBut.onMouseMove = function(){

       

       

                                       if(this._xmouse > 0 && this._xmouse < this._width && this._ymouse > 0 && this._ymouse < this._height){

       

       

                                                      this.gotoAndStop(2);

                                      }

       

                                      else

                                      {

       

                                                      this.gotoAndStop(1);

                                      }

                      };

      }

       

       

       

      [edit] - CS4 - Action Script 2

       

      Thanks guys!