New method for obtaining transmission infrared and visible spectra of thin polymeric films