Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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(timestextszoomsfontsstyle) {
  
with (findimg(200)) {
    
= ((GraalControl.width 2) - (this.width 2));
    
= ((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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.