View Single Post
  #6  
Old 08-29-2006, 10:09 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
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 0this.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.mousescreenx 14;
  
this.tooltip.mousescreeny 2;

__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote