Move your mouse to the fly for the dragonfly to eat it. Once you reach a certain size, your dragonfly will leave.
I got this from the 'Week Junior Science + Nature' magazine