I have a function which allows a move clip to be attached to a button and will show a hover caption. The text box is dynamic but I am having trouble changing the text for a specific button.
example: when I roll over my contact button, I want the hover caption to say something different then when I roll over my resume button.
here is the actionscript
function hover() {
// attaches the MC for hovering over the thumbnail
_root.attachMovie(“hoverTip”, “hoverTip”, 750, {_x:_root._xmouse, _y:_root._ymouse});
hoverTip.hoverTxt.text = “click here to send email”;
sp = 5;
onEnterFrame = function () {
// follow the ■■■■ mouse!
hoverTip._x += (Math.round(Math.round(_root._xmouse)-hoverTip._x))/sp;
hoverTip._y += (Math.round(Math.round(_root._ymouse)-hoverTip._y))/sp;
};
}
function dehover() {
// gets rid of that ■■■■ mouse thing!
sp = 5;
onEnterFrame = function () {
hoverTip._x += (Math.round(Math.round(_root._xmouse)-hoverTip._x))/sp;
hoverTip._y += (Math.round(Math.round(_root._ymouse)-hoverTip._y))/sp;
hoverTip.prevFrame(); // plays the MC backwards
if (hoverTip._currentframe == 1) {
// unloads it when it’s reached 1
hoverTip.unloadMovie();
}
};
}
contact_btn.onRollOver = function() {
hover();
};
contact_btn.onRollOut = function() {
dehover();
};
I have gotten the dynamic text to change, but like I said above I can get it to change for a specific button.
If anyone can help me out it would be greatly appreciated.