First things first, do you want it to make a unit "fly" just visually, or literally, flying, as in, can fly across cliffs/water ?
If you just want to fly "visually", just follow ultimate11's trigger.
But remember, by doing this method, you only make it fly, visually, as in, the unit can be lifted up with FlyHeight function but that unit can't really pass cliffs.
But if you want to to make it fly, literally, you'll have to use morph trick for that - it requires 2 unit, 1 with Foot, 1 with Fly.