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;
}
};