Question
rollover text in buttons doesn't work inside movieclip
hello,
i have a problem, i need to put a text when rollovers a button with the mouse and that small text follows the mouse,
i already now to do that but the problem is that the buttons are inside a movie clip so the text doesn't apear, it doesn't work
can anybody help me?
my code is this:
b2.onRollOver = function() {
captionFN(true, "Cervejaria", this);
this.onRollOut = function() {
captionFN(false);
};
};
b3.onRollOver = function() {
captionFN(true, "Eventos", this);
this.onRollOut = function() {
captionFN(false);
};
};
b4.onRollOver = function() {
captionFN(true, "Cafetaria", this);
this.onRollOut = function() {
captionFN(false);
};
};
b5.onRollOver = function() {
captionFN(true, "Bebidas", this);
this.onRollOut = function() {
captionFN(false);
};
};
b6.onRollOver = function() {
captionFN(true, "Localização", this);
this.onRollOut = function() {
captionFN(false);
};
};
b7.onRollOver = function() {
captionFN(true, "Chás", 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 = 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 = _root._xmouse+xo;
cap._y = _root._ymouse+yo;
cap._visible = true;
};
} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};
(b2; b3; b4; b5; b6 and b7 are the buttons)
thank you (sorry my english)
i have a problem, i need to put a text when rollovers a button with the mouse and that small text follows the mouse,
i already now to do that but the problem is that the buttons are inside a movie clip so the text doesn't apear, it doesn't work
can anybody help me?
my code is this:
b2.onRollOver = function() {
captionFN(true, "Cervejaria", this);
this.onRollOut = function() {
captionFN(false);
};
};
b3.onRollOver = function() {
captionFN(true, "Eventos", this);
this.onRollOut = function() {
captionFN(false);
};
};
b4.onRollOver = function() {
captionFN(true, "Cafetaria", this);
this.onRollOut = function() {
captionFN(false);
};
};
b5.onRollOver = function() {
captionFN(true, "Bebidas", this);
this.onRollOut = function() {
captionFN(false);
};
};
b6.onRollOver = function() {
captionFN(true, "Localização", this);
this.onRollOut = function() {
captionFN(false);
};
};
b7.onRollOver = function() {
captionFN(true, "Chás", 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 = 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 = _root._xmouse+xo;
cap._y = _root._ymouse+yo;
cap._visible = true;
};
} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};
(b2; b3; b4; b5; b6 and b7 are the buttons)
thank you (sorry my english)