The composition of pulsed-laser-deposited Y-Ba-Cu-O and Ba-K-Bi-O thin films is shown to be strongly affected by target conditioning, gas pressure, and target-substrate distance. For both compounds, ablation from a freshly sanded target surface results in films with an excess of the more volatile elements. The concentration of these volatile elements in the films decreases until the system reaches a steady state after sufficient ablation from the target. Y-Ba-Cu-O film composition is also affected by oxygen pressure and target-substrate distance. Increasing pressure or distance results in relative copper and barium depletion in the central region of deposition, presumably due to differences in the efficacy of oxygen in scattering the different elements. This relationship between pressure, distance, and composition is shown to be significant for the growth of optimal superconducting Y-Ba-Cu-O thin films. The composition of Ba-K-Bi-O is also affected strongly by background gas pressure. Ba-K-Bi-O deposited in vacuum is potassium deficient in the film center. A background argon pressure of 1 Torr, however, increases the potassium concentration and results in films with uniform composition over a broad area. We argue that this effect is significant in explaining a successful growth method for superconducting Ba-K-Bi-O films.