
On the fly
Spontaneity Connotation
Conveys a sense of improvisation and quick thinking in an unplanned situation. 
Time Pressure
Implies that there was not much time for preparation and the action was done hastily. 
Casual Use
More commonly used in casual or informal conversations, not in formal writing. 