0 registered members (),
1,397
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Panel Fading Problems
[Re: badapple]
#213206
06/26/08 11:08
06/26/08 11:08
|
Joined: Apr 2007
Posts: 582 Germany
Poison
User
|
User
Joined: Apr 2007
Posts: 582
Germany
|
btw, xbox why have you posted it twice?
Everything is possible, just Do it!
|
|
|
Re: Panel Fading Problems
[Re: xbox]
#213294
06/26/08 20:43
06/26/08 20:43
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
i gues the background isnt refreshd so u need to load a lvl ore use vec_set(screen_color,vector(8,8,8));
"empty"
|
|
|
Re: Panel Fading Problems
[Re: badapple]
#213337
06/27/08 06:17
06/27/08 06:17
|
Joined: Jun 2008
Posts: 19
halfpint
Newbie
|
Newbie
Joined: Jun 2008
Posts: 19
|
I got this to work var video_mode = 7;
var fade_speed = 10;
bmap background = "background.bmp";//back panel
bmap background1 = "background1.bmp";//above panel
bmap start_norm = "start_norm.bmp";
bmap start_roll = "start_roll.bmp";
bmap mouse = "mouse.bmp";//mouse picture
function main()
{
wait (3);
mouse_map = mouse;
mouse_mode = 3;
while(1)
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
wait(1);
}
}
panel background_1//starting background picture
{
bmap = background;
layer = 1;
button ( 300, 300, start_roll, start_norm, start_roll, fadein,NULL,NULL);
flags = VISIBLE;
}
panel background_2
{
bmap = background1;
layer = 2;
button ( 300, 200, start_roll, start_norm, start_roll, fadeout,NULL,NULL);
alpha = 0;//starts at 0 alpha
flags = TRANSLUCENT;//translucent allows the alpha to work
}
function fadein
{
background_2.visible = ON;
while ( background_2.alpha < 100)
{
background_2.alpha += 10*time;//if alpha is not at 100 increase it
wait(1);
}
}
function fadeout
{
while ( background_2.alpha > 0)
{
background_2.alpha -= 10*time;//if alpha is not 0 decrease it
wait(1);
}
background_2.visible = OFF;//make sure to turn off the top panel otherwise the
//bottom panels button wont work
} Hope this helps.
|
|
|
|