Any radar gun is capable of detecting speed while in motion. A radar gun calculates the speed an obect is moving relative to the gun, so, if the gun is standing still, the speed registered will be the actual speed of the object.
Radar guns that are BUILT IN to police cars are wired to the spedometer so that they know how fast that car, and therefore the gun, are moving. When the officer uses the gun to guage the speed of your vehicle, he presses a button on the radar gun indicating whether you were moving towards him or away from him.
If you are moving towards him, the devices subtracts the police car's speed from the speed it read on the radar, giving an accurate reading of your speed.
If you are moving away from him, the device adds the car's speed to come up the correct speed.
Laser guns work in the same manner. So yes, a cop can shoot radar in almost any direction while driving. The downside however, is that it is a lot more difficult to aim the radar while moving, so most officers will only use this technique on the highway or in situations where they can be sure of which car they are actually clocking.
In speed traps, cops will still use the "sit and shoot" method in order to be sure of the vehicle they have targeted.
Hope this helps...