# Modify hover captions .fla

**URL:** <https://forum.kirupa.com/t/modify-hover-captions-fla/213071>\
**Category:** Uncategorized\
**Created:** [January 16, 2007, 7:57pm UTC](https://forum.kirupa.com/t/modify-hover-captions-fla/213071 "2007-01-16T19:57:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hroth](https://avatars.discourse-cdn.com/v4/letter/h/8e8cbc/32.png) [@hroth](https://forum.kirupa.com/u/hroth)\
**Post date:** [January 16, 2007, 7:57pm UTC](https://forum.kirupa.com/t/modify-hover-captions-fla/213071/1 "2007-01-16T19:57:38Z")

</div>

'Ello all,

I’ve been trying to modify the “hover captions” tutorial file  
[http://www.kirupa.com/developer/mx2004/hover\_captions.htm](http://www.kirupa.com/developer/mx2004/hover_captions.htm)

My project is broken into a few levels and the captions are floating below  
one of the levels. So, I’m trying to have the test boxes float **above**  
everything. (or in my top level)

Currently,the buttons and floating text box are on \_level2 and they are blocked by \_level3 stuff.  
The script in question is (with one button instead of many for simplicity):

b1.onRollOver = function() {  
captionFN(true, “hello world”, this);  
this.onRollOut = function() {  
captionFN(false);  
};  
};  
captionFN = function (showCaption, captionText, bName) {  
if (showCaption) {  
\_root.createEmptyMovieClip(“hoverCaption”, this.getNextHighestDepth());  
cap.desc.text = captionText;  
cap.\_width = 7\*cap.desc.text.length;  
cap.\_alpha = 100;  
//  
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 = \_root.\_xmouse+xo;  
cap.\_y = \_root.\_ymouse+yo;  
cap.\_visible = true;  
};  
} else {  
delete hoverCaption.onEnterFrame;  
cap.\_visible = false;  
}  
};

any hep would be GREATLY appreciated…

thanks~!

-hroth

:dog:
