I just learned something recently and wanted to share.
"Fly-By: When you declare an attack, if the target space is within 2 spaces, add 1 blue die to your attack pool. After the attack resolves, gain 2 movement points."
The first sentence requires the trooper to be within 2 spaces. However, the second sentence triggers the ability without the figure needed to be within two space. Thus, the second sentence should be read and applied independently, regardless of where the trooper is. Apparently, this has been confirmed by FFG.