Switch movement mode on state transition

how can i switch movement on an animation state change, for instance i have a flying animation that only plays when im falling for a certain amount of time how would i also change the movement mode to flying during this state