Superconducting thin MgB2 films have been prepared using pulsed-laser deposition. We have studied the influences of deposition conditions such as pressure and temperature, the substrate-material, and annealing-procedures. Various approaches have been pursued to obtain the right Mg content in the film during ablation and annealing. Special care has been taken to avoid oxidation of Mg in the laser plasma and deposited film, by optimizing the background pressure of Ar gas in the deposition chamber. The annealing procedure was found to be the most critical to obtain superconducting films.