0 Replies Latest reply on Jun 12, 2006 8:50 AM by Newsgroup_User

    help fixing these hover captions I have with a bug.

    Level 7
      I have hover captions in my movie and they have the following bug. The
      work good most of the time. If I trigger them though, before all my
      content is fully loaded(everything gets attached dynamically), then they
      end up underneath other things. You can see what I am talking about
      here: http://www.agilitygraphics.com
      If you roll over the buttons before all is loaded you will see what I mean.

      The AS for the hover captions is as following:

      captionFN = function (showCaption, captionText, bName) {
      if (showCaption) {
      this.attachMovie("caption", "cap",
      this.getNextHighestDepth(),{_visible:false});
      this.createEmptyMovieClip("hoverCaption",
      this.getNextHighestDepth());

      cap.desc.text = captionText;
      cap.desc.autoSize = true;

      cap.cap_color._width = cap.desc._width + 8;
      cap.cap_color_shadow._width = cap.desc._width + 8;
      //
      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;
      }
      };


      What I don't understand, is why the hover caption does not ALWAYS take
      the highest level, eventhough, I attach it with the
      getNextHighestDepth() in the showCaption part of the ifStatement.


      It seems that once it takes a depth, it stays on that depth, rather then
      taking a new getNextHighestDepth() each time the showCaption is
      triggered, which would fix my current problem, I think.


      Any thoughts on that would be greatly appreciated!
      Thank you,
      Brian