View Single Post
  #5  
Old 01-31-2010, 01:43 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
The for loop for "j" is to loop through multiple things being drawn on-top of the polygon. I need 1 text, 1 image and the polygon to all fade at the same time. Looping "j" like that lets me set all the alpha on al lthe images to the same so they fade nice and neatly.

As for the i/100. Are you sure? I mean I did it last night, it worked so im confused.

PHP Code:
Example:
50 100 50% (0.50)
100 0% (0.00)
100 Cannot divide by zero 
How do you get I would only have a value of .01 at most? Like I said, it works almost flawlessly. My only problem is it jumps to (i think the minumum) value in the foor loop, and does not increase as the loop increases.

** EDIT
sorry did not notice I had "+= .01", however, this does not solve the problem.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
with (findimg(4002) ) {
    
this.xy2 = {screenwidth-275,25};
    
polygon = {this.xy2[0],this.xy2[1],this.xy2[0]+250,this.xy2[1],this.xy2[0]+250,this.xy2[1]+75,this.xy2[0],this.xy2[1]+75};
    
layer 4;
    
red=green=blue=25;
  }
  
changeimgcolors(4002,0,0,0,.5);
  
with (findimg(4003)) {
    
this.xy2 = {screenwidth-215,35};
    
x=this.xy2[0];
    
y=this.xy2[1];
    
layer 5;
    
text "scriptless has logged on";
    
zoom .7;
  }
  
with (findimg(4004)) {
    
this.xy2 = {screenwidth-260,45};
    
x=this.xy2[0];
    
y=this.xy2[1];
    
layer 5;
    
image "head1212.png";
    
zoom 1.5;
  }
  
changeimgpart40040643232 );
  
  for ( 
i=0i<1i+= 0.01) {
    for ( 
j=4002j<4005j++ ) {
      
with (findimg(4002)) { alpha i; }
    }
    
waitfor("""noevent".1);
    
player.chat i;
  }

This seems to make the image invisable. So wither .1 is tooo fast or its not working and seeing how I did test the speed. That is not the problem, tho setting the i=0; i<1; i+= 0.01; seems to effect it if i change i=0 to i=.25; i<.75;

And again, no fade in/out effect, just a alpha that sits there unchanged.
Reply With Quote