Photon transport in a time-dependent interstellar cloud