Added flip sprite func.