Code:
PANEL* test = 
{
	pos_x = 100;
	pos_y = 100;
	layer = 1;
	bmap = panel_bmp;
	flags = OVERLAY | VISIBLE;
	event = mouse_use;
}

function mouse_use()
{
	if(mouse_left == 1)
	{
		test.pos_x = mouse_cursor.x;
		test.pos_y = mouse_cursor.y;
	}
}


This will work! smile