1 Reply Latest reply on Jun 19, 2006 10:55 AM by 2m

    Hover caption help!

    Level 7
      I have hover captions in my movie and they have the following bug. They
      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.

      What can I do so the hover captions get attached to the very hightest
      depth each time I rollover a button, rather then staying in the depth
      that they initially get attached to?

      Tank you for any help with this!!!
      Brian



      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;
      }
      };
        • 1. Re: Hover caption help!
          2m Level 2
          Hallo Brian,

          am EInfachsten ist es, wenn Du den clip auf einem sehr hohen depth level auf _level0 attachst. 1 000000 solle tun, aber es gibt eine absolut höchste Ebene, ich weiß die Zahl nur eben nicht auswendig.
          (Kleiner Hinweis noch: Wenn Du den onEnterFrame durch einen onMouseMove ersetzt, dann wird's noch etwas flüssiger.)

          Markus