using camera.isButtonPressed() to beter sync flash to picture