ok, i have this menu. when you press start, a movie plays and the first level is supposed to load. it does all of that but there are problems and i dont know how to solve.

issue 1. the menu panel is still shown when the level loads.
issue 2. the included scripts to start playing the game are not present. they are included on the levels themselves, but when the first level is loaded, i get "action not found" errors. what am i doing wrong?

Code:
/////////////////////////////////////////////////////////////////////////////////////////
var video_mode=7;
var video_screen=1;




bmap panel_pcx = <mosrn3.bmp>;
////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////////////


panel energy_pan // background panel
{
	bmap = panel_pcx;
	layer = 15;	
	pos_x = 1;
	pos_y = 30;
	flags = d3d, overlay, refresh, visible;
}

entity energy_sprite 
{ 
	type = <mo+10.pcx>; 
	layer = 85; 
	view = camera; 
	x = 450; 
	y = 14; 
	z = 44; 
	flags = visible, flare, bright;
} 

function init_animsprite() 
{ 
	while (1) 
	{ 
		energy_sprite.frame += 0.1 * time_step; 
		if (energy_sprite.frame > 10) 
       {
        energy_sprite.frame =0; // loop
       }
		wait (1); 
	} 
}

////////////////////////////////

var effectvol = 50;
var musicvol = 50;

SOUND wave = "horr1.wav";
var wavehandle;


bmap start_w=<menustr2.bmp>;
bmap start_o=<menustr1.bmp>;
bmap pfeil=<handcur.bmp>;
bmap exit_o=<menuquit.bmp>;
bmap exit_w=<menuquit2.bmp>;

string lvl01 ="samoffice.wmb";
string sceneext =".wmv";
string scene01 ="motel66mov.wmv";

string buttonext =".wav";
string buttonsnd ="button.wav";

function start_game();
function exit_game();









panel pn_menue

{ 
  
  button=300,400,start_w,start_o,start_w,start_game,null,null;
  button=300,480,exit_w,exit_o,exit_w,exit_game,null,null;
  //if(freeze_mode==1){button=650,430,back_white,back_blue,back_white,game_menue,null,null;}
  flags = overlay, refresh, visible;
  layer=300;
  
}



function main()
{
  init_animsprite(); 
level_load("dummylv.wmb");   

Menue();
wavehandle = snd_loop(wave,30,0);
wait(-120); 

}
	

function menue()
  
  {
  	
  	//while(levelstart==0){wait(1);}
  	mouse_mode=2;
  	mouse_map=pfeil;
  	
  	while(pn_menue.visible==on){
  	mouse_pos.x = mouse_cursor.x;
  	mouse_pos.y = mouse_cursor.y;
   wait(1);}
  }
  
function start_game()

{ 
wait(1);
media_play(buttonsnd, null, 50);
media_play(scene01, null, 100);
wait(-120);
level_load("samoffice.wmb");      // load level nuhvn.wmb 
 
wait(1);

}


function exit_game()

{ 
// your exit game stuff here
media_play("button.wav", null, 50);
exit;
}

}




My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."