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
}