Search Tutorials
Mouse Following Tooltip
By Sidney de Koning, email: sidney@oeoe.nl
Make three layers in your main timeline, called actions, caption
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.gotoAndPlay(2);
}
function remove_tooltip () {
stopDrag ();
removeMovieClip ("tooltip1");
}
Now make a graphic and name it 'caption' give it two layes;one with a nice background and another with a dynamic txtbox, multiline, wordwrap turned on and give it the variable 'tooltip'. This is going to be your tooltip.
Now make a new Movieclip and call it caption_MC, leave the first frame blank with a
Now make a button with some nice up-, over-, down-, and hit states,
on (rollOver) {
_root.tooltip("This is a mouse following tooltip!");
}
on (rollOut, dragOut) {
_root.remove_tooltip();
}
Tada ! Your tooltip is ready !! -Sidney-
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|