View Single Post
  #1  
Old 08-31-2007, 03:35 AM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
This Is Ridiculous

PHP Code:
//#CLIENTSIDE
enum {
  
MODE_NONE,
  
MODE_FADEINTEXT,
  
MODE_FADEOUTTEXT
}
function 
onCreated() {
  
hideimg(200);
  
this.mode = MODE_NONE;
  
fadeInText(1, "Welcome.", 2, "Comic Sans MS", "c");
}
public function 
fadeInText(time, stext, szoom, sfont, sstyle) {
  
with (findimg(200)) {
    
x = ((GraalControl.width / 2) - (this.width / 2));
    
y = ((GraalControl.height / 2) - (this.height / 2));
    
text = stext;
    
zoom = szoom;
    
font = sfont;
    
layer = 4;
    
style = sstyle;
    
visible = true;
    
alpha = 0;
  }
  
this.mode = MODE_FADEINTEXT;
  
this.fadeint = 0.05 / time;
  
  
setTimer(0.05);
}
function 
onTimeout() {
  switch (
this.mode) {
    case 
MODE_FADEINTEXT:
      echo(
"Fading in text.");
      
with (findimg(200)) {
        
alpha += thiso.fadeint;
        if (
alpha => 1) {
          
thiso.mode = MODE_NONE;
          
setTimer(0);
        }
      }
    break;
  }
  
setTimer(0.5);
} 
That should work perfectly. O_O And it refuses to work, what is happening is the image is not visible then it just becomes visible. With no fading. >:O
__________________
Stan.
Reply With Quote