Actionscript files? (*.as)

Actually, what is the advantages of using external script files for a game? How does this work?