Quote:
Originally Posted by scriptless
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)
0 / 100 = 0% (0.00)
100 / 0 = 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.
|
With
PHP Code:
for ( i=0; i<1; i+= .01 ) {
"i" would never be greater than 0.99, 0.99 divided by 100 is 0.0099, which is barely anything.
I think you may have been trying to do:
PHP Code:
with (findimg(j)) { alpha = i/100; }
In order to adjust the Alpha of all the displays at once.