# \[o4 pro\] tooltip problem (component button)

**URL:** https://forum.kirupa.com/t/o4-pro-tooltip-problem-component-button/48035
**Category:** flash
**Created:** [April 9, 2004, 10:25am UTC](https://forum.kirupa.com/t/o4-pro-tooltip-problem-component-button/48035 "2004-04-09T10:25:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![icestream](https://avatars.discourse-cdn.com/v4/letter/i/e19adc/32.png) [@icestream](https://forum.kirupa.com/u/icestream)
#### Post date: [April 9, 2004, 10:25am UTC](https://forum.kirupa.com/t/o4-pro-tooltip-problem-component-button/48035/1 "2004-04-09T10:25:21Z")

</div>

Hi,

I’m having some difficulties with my tooltip. The whole script works on a normal button but not on a component button.

```auto
MovieClip.prototype.tooltip = function(tekst){
	
tfm = new TextFormat("myFont", 12);

function createToolTip()
{
	var t = _root.createEmptyMovieClip("mc_tooltip", 33333);
	t.createTextField("txt_tooltip", 1, 0, -22, 2, 2);
	var tf = t.txt_tooltip;
	tf.embedFonts = true;
	tf.autoSize = true;
	tf.selectable = false;
	tf.text = " " + tekst + " ";
	tf.border = true;
	tf.background = true;
	tf.backgroundColor = 0xFFFF99;
	tf.setTextFormat(tfm);
	t.onMouseMove = function()
	{
		this._x = _root._xmouse;
		this._y = _root._ymouse;
	}
	t.onMouseMove();
}
function removeToolTip()
{
	mc_tooltip.removeMovieClip();
}
function checkOutIn(button){
	button.onEnterFrame = function(){
	if(button.hitTest(_root._xmouse,_root._ymouse)){
		createToolTip();
		trace("acties");
	}
	else {
		trace("geen actie");
		removeToolTip();
	}
	}
}
setInterval(checkOutIn(this),100);
}

//remember this are all component buttons
wissen.tooltip("velden leeg maken");
toevoegen.tooltip("News bericht toevoegen");
url.tooltip("hyperlink");
b.tooltip("dikke letters");
i.tooltip("schuine letters");
li.tooltip("lijst");
u.tooltip("onderstreep");
del.tooltip("delete nieuws berichten");
resultaat.tooltip("bekijk het resultaat");
maakTabelLeeg.tooltip("verwijder alle nieuws berichten");

```

The problem lies in the so called checkOutIn function. When i give a component a oef handeler i suddenly disappears.

Does somebody knows how to solve this problem?

thnx
