# Turning on and off tooltips

**URL:** <https://forum.kirupa.com/t/turning-on-and-off-tooltips/252581>\
**Category:** flash\
**Created:** [February 21, 2008, 12:57pm UTC](https://forum.kirupa.com/t/turning-on-and-off-tooltips/252581 "2008-02-21T12:57:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bt30](https://avatars.discourse-cdn.com/v4/letter/b/8797f3/32.png) [@bt30](https://forum.kirupa.com/u/bt30)\
**Post date:** [February 21, 2008, 12:57pm UTC](https://forum.kirupa.com/t/turning-on-and-off-tooltips/252581/1 "2008-02-21T12:57:53Z")

</div>

Hi all,

I have downloaded Lee Brimlows ([gotoandlearn.com](http://gotoandlearn.com)) tooltip example and I am trying to modify it so I can turn Tool tips on and off.

I have managed to come up with the function that turns them off,

b5.onPress = function()  
{  
unloadMovie(tooltip);

}

I need some help with how to turn them back on with the click of a button.

I have tried

b6.onRelease  
{

\_parent.loadMovie(“tooltip”);  
}

but no luck, any ideas? I have attached a zip file of the problem.

Code is listed below   
[COLOR=Red]  
tooltip.\_visible = false;

var tipInt;

b1.onRollOver = function() {  
tipInt = setInterval(showTip,100,“Button 1”);  
}

b1.onRollOut = function() {  
hideTip();  
}

b2.onRollOver = function() {  
tipInt = setInterval(showTip,100,“Button 2”);  
}

b2.onRollOut = function() {  
hideTip();  
}

b3.onRollOver = function() {  
tipInt = setInterval(showTip,100,“Button 3”);  
}

b3.onRollOut = function() {  
hideTip();  
}

b4.onRollOver = function() {  
tipInt = setInterval(showTip,100,“Button 4”);  
}

b4.onRollOut = function() {  
hideTip();  
}

b5.onPress = function()  
{  
unloadMovie(tooltip);

}

b6.onRelease  
{

\_parent.loadMovie(“tooltip”);  
}

var count = 0;

function showTip(tiptext) {  
if(count == 5) {  
clearInterval(tipInt);  
count = 0;  
tooltip.tiptext.text = tiptext;  
tooltip.\_x = \_root.\_xmouse;  
tooltip.\_y = \_root.\_ymouse;  
tooltip.\_visible = true;  
\_root.onMouseMove = function() {  
tooltip.\_x = \_root.\_xmouse;  
tooltip.\_y = \_root.\_ymouse;  
updateAfterEvent();  
}  
}

```
else {
    count++;
}

```

}

function hideTip() {  
clearInterval(tipInt);  
tooltip.\_visible = false;  
delete \_root.onMouseMove;  
}

[/COLOR]
