Export mc's positions at runtime in an external file for reuse

hello mates,

i’m trying to hardcode a complicated looping movement of an mc on the stage.
the way i plan to deal with it is first, to use a guide layer to actually tell the mc where to go, and then save at runtime the sequence of position (x/y coordinates) the mc goes to to follow the movement. With this set of coordinates, i will reproduce the movement via actionscript instead of guiding.

anybody knows how i can output those variables into an external txt file from flash at runtime ?