When flash is on, are you seeing a constant beam of light on the subject you're trying to photograph? If so, are you certain that you are not in "video" mode? If you're absolutely certain in camera mode then you might want to backup your device and then restore it just in case it is a software glitch of some sort. If it still occurs after that, it's safe to assume that you have a defective camera. Are you still under warranty or have AppleCare? If so, you might want to make a Genius Bar appointment with the nearest Apple Store.