There are ways to work around having to use showtext.
controlling script:
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.imgs = new [5];
temp.texts = {
"I am testing.",
"No really, I am.",
"C'mon! I seriously am!",
"Why don't you believe me?",
"Fine, be that way! :("
};
this.tlen = this.imgs.size();
for (temp.i=0;temp.i<this.tlen;temp.i++) {
this.imgs[temp.i] = showtext(200+temp.i,20,20+14*temp.i,"Arial","",temp.texts[temp.i]);
this.imgs[temp.i].parent = this;
with (this.imgs[temp.i]) {
this.layer = 5;
this.zoom = 12/23;
this.join("mouseover");
this.setToolTip("test text");
this.tooltip = findimg(350+temp.i);
this.width = gettextwidth(12/23,"","Arial",temp.texts[temp.i]);
this.height = gettextheight(12/23,"","Arial");
}
}
}
mouseover class:
PHP Code:
//#CLIENTSIDE
public function setToolTip(text) {
this.tooltext = text;
setTimer(0.05);
}
function onTimeout() {
if (mousescreenx in |this.x,this.x+this.width|
&& mousescreeny in |this.y,this.y+this.height|) {
showTooltip();
}
elseif (this.wait > 0) this.wait --;
else {
thiso.tooltip.text = "";
}
setTimer(0.05);
}
function showTooltip() {
for (temp.i=0;temp.i<this.parent.tlen;temp.i++) {
this.parent.imgs[temp.i].wait = 0;
this.parent.imgs[temp.i].tooltip.text = "";
}
this.wait = 20;
echo(this.tooltext);
this.tooltip.zoom = 12/23;
this.tooltip.layer = 7;
this.tooltip.text = this.tooltext;
this.tooltip.style = "b";
this.tooltip.x = mousescreenx + 14;
this.tooltip.y = mousescreeny + 2;
}