I love to play games and do other tasks that quickly drain the iPhone's battery. Sometimes I'll use the phone while plugged into a power supply. Does the iPhone still use the battery when performing these high-performance tasks while connected to the power source?
Although Nathan has a valid point for wall charging, from personal experience it is possible to discharge the battery while it is plugged into a powered USB port.
Even though my iPod Touch 2nd Gen was plugged into my MacBook, playing Need for Speed Undercover was sufficient to cause the device to power down due to low battery. It seems that a powered USB doesn't provide sufficient charge to offset the drain caused by a graphically intensive game.
To sum up: if you are worried about exhausting the battery while charging, use a wall charger.
When you're plugged in to a power source, the iPhone will not use the battery unless for some reason you are using more power than the charging source can provide.
Normally, unless some process is hitting the CPU and GPU and all radios (such as a GPS mapping app), even a computer USB port at 500 mA will both power your games/apps and charge your battery at the same time.
Even if your game takes more current than the charge is providing, using all the wall power will reduce the amount of battery being consumed which will certainly save your battery.
Of course, you should expect hundreds of full charge/discharges and as long as you are one a month draining the battery, you don't need to keep the electrons moving otherwise for good battery lifespan and health.
nonsense , the icon means nothing , i have my phone at 100% with the plugged in icon , i use it for awhile it goes back to lightning icon , i use r more it goes down to 99% , at 96% now having used it plugged in since 100% watching stuff in YouTube multitasking iPod etc
it shows Apple electronics suck that they are clever enough to implement this - or they prefer batteries have shorter life , to charge you more money