How to save values from Flash to External text file?

I am able to load values from a text file into Flash using LoadVars.
But how to do the reverse process

i.e to save value from Flash into a text file