
01-31-2010, 01:16 AM
|
|
Banned
|
Join Date: Jul 2004
Location: London
Posts: 2,029
|
|
Quote:
Originally Posted by scriptless
Hello, I wanted to start off by explaining what I am trying to accomplish.
I wanted to make a similar effect to the xbox360/ps3 notification system. For those of you who use "ubuntu" you may notice it too, uses a similar effect called "NotifyOSD".
What I am doing here is drawing a polygon, and replacing it with an image. However, I wanted to use GUI's but had several problems. I could not make a semi-transparent black window appear. I was using GuiWindowCtrl, GuiControl, and GuiShowImgCtrl. No sucess, so I turned to polygons.
The problem I am having is that I need the polygon (or gui if anyone can help with that) to fade in/out. I am stumped why this code would not work seeing as it looks correct to me at first glance. Maybe anyone else might have an idea what I am doing wrong.
PHP Code:
//#CLIENTSIDE function onCreated() { with (findimg(4002) ) { this.xy2 = {screenwidth-275,25}; this.xy = {temp.poly[0]+50, temp.poly[1]+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; } changeimgpart( 4004, 0, 64, 32, 32 ); for ( i=0; i<1; i+= .01 ) { for ( j=4002; j<4005; j++ ) { with (findimg(4002)) { alpha = i/100; } } waitfor("", "noevent", 0.5); } }
Thank you in advanced,
scriptless
|
I'm not sure but I would have thought that this. inside of with(){} would be referencing the provided object or in this case the image object instead of parent script variables, have you tried changing them all to thiso.?
Edit: Doesn't seem to the the case. |
|
|
|