Hi all,
I’ve made a map of Europe with a tooltip on some of the countries. When you hover over lets say Spain, you get a tooltip saying ‘Lets go to Spain!’.
Now my problem is that sometimes the tooltip is to short for the text.
Is there a way to make my tooltip expand according to the text I want to show?
Actionscript on frame 1:
function tooltip (string) {
xmouse = getProperty("", _xmouse);
ymouse = getProperty("", _ymouse);
duplicateMovieClip ("_root.tooltip", "tooltip1", 1);
tooltip1.tooltip = string;
setProperty (tooltip1, _x, xmouse);
setProperty (tooltip1, _y, ymouse);
startDrag ("_root.tooltip1");
tooltip1.gotoAndStop(2);
}
function remove_tooltip () {
stopDrag ();
removeMovieClip ("tooltip1");
}
Actionscript on the buttons/countries:
on (rollOver) {
_root.tooltip("Lets go to Spain!");
}
on (rollOut, dragOut) {
_root.remove_tooltip();
}