didn't actually test your code, but my guess is that any of the following
them.
"ltdesign1" <webforumsuser@macromedia.com> wrote in message
news:ekfo3i$bib$1@forums.macromedia.com...
> Hi,
>
> 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:
>
>
http://qa-scapaosd.migcom.com/Content/10138/east_county.html >
> Rollover the bit of land just right of the highway 12 sign in the lower
> right
> part of the map for an example of one that appears far left of the
> rollover hit
> state.
>
> I am using the following actionscript:
>
> captionFN = function (showCaption, captionText, bName) {
> if (showCaption) {
> this.attachMovie("caption", "cap", this.getNextHighestDepth());
> this.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
> hoverCaption._alpha
> 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...
>