6 Replies Latest reply on Oct 17, 2006 7:07 PM by kglad

    Help with hover captions


      I am having issues with this hover caption script I got from kirupa. Most of the captions work great but some (especially long names appear way to the left of the button).

      You can see an example here:


      (The two examples would be rolling over the green land area just the left of hwy 37 (Dickson Ranch) and then just to the left of that (Sleepy Hollow Dairy)

      I am using the following actionscript:

      captionFN = function (showCaption, captionText, bName) {
      if (showCaption) {
      this.attachMovie("caption", "cap", this.getNextHighestDepth());
      this.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
      cap.desc.text = captionText;
      cap._width = 7*cap.desc.text.length;
      cap._alpha = 75;
      if ((bName._width+bName._x+cap._width)>Stage.width) {
      xo = -2-cap._width;
      yo = -17;
      } else {
      xo = 2;
      yo = -17;
      hoverCaption.onEnterFrame = function() {
      cap._x = this._xmouse+xo;
      cap._y = this._ymouse+yo;
      cap._visible = true;
      } else {
      delete hoverCaption.onEnterFrame;
      cap._visible = false;

      Any ideas? I have played around with the x any y values and nothing seems to really change it...