use this:

loadingpan.scale_x=screen_size.x/bmap_width(loadingpan.bmap);
loadingpan.scale_y=screen_size.y/bmap_height(loadingpan.bmap);