Hi, I'm having a slight problem with a panel... The panel is just a red 1600x1200 PCX that appears briefly then fades out when the player is hit. However, the first time the player is hit, the game freezes for about a second, evidently while the panel is loaded. After that, there's no slowdown.

This is the code:

code:

//Bitmap used for blood in first person mode:
bmap bloodmap=<bldfade.pcx>;

panel bloodscreen
{
bmap=bloodmap;
flags=refresh,d3d;
layer=10;
}

function blood_screen()
{
bloodscreen.visible=on;
bloodscreen.transparent=on;
bloodscreen.alpha=100;
while (bloodscreen.alpha>0)
{
bloodscreen.alpha-=20*time;
wait(1);
}
bloodscreen.visible=off;


Any ideas on how I can get rid of the slowdown when the panel is first used?

Thanks,
Keith