# Hover caption w/ multiple dynamic text fields?

**URL:** <https://forum.kirupa.com/t/hover-caption-w-multiple-dynamic-text-fields/276357>\
**Category:** flash\
**Created:** [November 26, 2008, 4:08am UTC](https://forum.kirupa.com/t/hover-caption-w-multiple-dynamic-text-fields/276357 "2008-11-26T04:08:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwgoldie](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dwgoldie](https://forum.kirupa.com/u/dwgoldie)\
**Post date:** [November 26, 2008, 4:08am UTC](https://forum.kirupa.com/t/hover-caption-w-multiple-dynamic-text-fields/276357/1 "2008-11-26T04:08:09Z")

</div>

I’m creating a map that shows county statistics and am using hover captions to show the data. I’ve created the map and have county names displayed as I roll over each county using the code below gleaned from the tutorial. However, I would like to include additional dynamic text fields in the hovering box for population, area, etc. Is there a way to have multiple dynamic text fields hover in one movieclip, and if so, how do I do this?

stop();  
countya\_mc.onRollOver = function() {  
captionFN(true, “County A”, this);  
this.onRollOut = function() {  
captionFN(false);  
};  
};  
captionFN = function (showCaption, captionText, bName) {  
if (showCaption) {  
\_root.createEmptyMovieClip(“hoverCaption”, this.getNextHighestDepth());  
cap.desc.text = captionText;  
cap.\_alpha = 90;  
//  
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;  
}  
};
