I've tested it and it moves as long as the mouse is clicked. Are you setting 'mouse_mode'?

Also this is a nicer way to write your click event...
Code:
function popupbox_click_event(PANEL* panel)
{
	while(mouse_left)
	{
		panel.pos_x += mickey.x;
		panel.pos_y += mickey.y;
		wait(1);
	}
}