Using AT transmission

do you need to stop before changing from drive to 1 or 2? or is it ok to change gears while the car is running while your on drive, 1 or 2 will it damage the transmission?

thanks.