# Tooltip Class \[AS2\]

**URL:** https://forum.kirupa.com/t/tooltip-class-as2/72582
**Category:** flash
**Created:** [December 7, 2004, 10:53am UTC](https://forum.kirupa.com/t/tooltip-class-as2/72582 "2004-12-07T10:53:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![roady](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@roady](https://forum.kirupa.com/u/roady)
#### Post date: [December 7, 2004, 10:53am UTC](https://forum.kirupa.com/t/tooltip-class-as2/72582/1 "2004-12-07T10:53:45Z")

</div>

Hi, I’m building a tooltip class but are not sure if I can use it this way.  
The thing is that I want the tooltip on several different things (classes and movieclips).

I started like this.

```auto

class com.tooltip.Tooltip extends MovieClip {
	
	/ ***************
	*
	* Constructor
	*
	*************** /
	
	function Tooltip(myText:String) {
		trace("the Text. "+ myText + "- "+ this)
		this._visible = false;
  	}
	

	function activeate() {
		trace("ssssssssss "+ this)
		//this._visible = true;
		
		for(var nisse in this) {
			trace(nisse + " : "+ this[nisse])
			
		}
	}
	
}

```

Then if I want to use this tooltip in maby another class I can add it in the constructor with (testObj) :

```auto

class com.navigation.NavigationButton extends MovieClip {
	function NavigationButton(){
		init()
		
		testObj = new com.tooltip.Tooltip("try this mon");
	}

	function onRollOver() {
		testObj.activeate()
	}
}

```

with this I can get the function [red]activeate[/red] to work, but it isn’t a movieclip then? or? :hurt:

In my trace in the [red]activeate[/red] function I get.

```auto
ssssssssss [object Object]
_visible : false

```

To get it to work I need to be able to hide/show, move the class. And by the way, the class is a movieclip that lies on the Stage.

anyone got an Idéa :q:
