Camera - Using the flash to illuminate in camera mode? On my HTC One-X the Camera app can take videos or photos. When recording video you can turn the flash on to provide some illumination.

Is there a way of doing this while in the camera mode when composing a shot?

The other night I was in the garden in the pitch black trying to take some photos of some nocturnal animals. When in camera mode the viewfinder is also pitch black which made it very difficult to line up the photo. I ended up having to record a video, turn on the flash for some light and then take photos while the video was recording.

This is not ideal, and so I wondered if there is any way to get the flash to provide light while aiming the camera for a normal photo.
The built-in camera app (on vanilla Android and every other device I've personally seen) doesn't support this. The flash will only come on as the picture is being taken, and you cannot set it to provide continuous light when taking a picture.

There are two potential options, depending somewhat on the version of Android you're using. One option would be to use the video mode (with the flash enabled) and capture images as you're recording, then discard the video at the end. You should be able to do this on newer versions of Android by tapping the screen while video is recording. I believe this only works on Jelly Bean (or later), but manufacturers have implemented this themselves in a few cases (ex: The Galaxy S3).

A second option would be to use a third-party camera application. Camera MX, for example, allows you to put the flash into "torch" mode while taking pictures. Simply tap on the lightning bolt icon until the small infinity symbol appears on top of it: