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.
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) :
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.
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: