A new study suggests that two-legged dinosaurs were flapping their wings before they gained the ability to fly.