Dynamic Action Script... I think?

Okay, so I’m still really new at this whole action script making my animations do cool things. So bare with me if this doesn’t make a ton of sense.
I was wondering if there’s a way to have my action script read from an external source (ie; a .txt file)

This is the current script I have attached to a Keyframe, which reads the name from an input text box (inputname) and attaches a specific greeting to certain names (name#).

outputname = “Greetings " + inputname;
if (inputname == “name1”) {
outputname = inputname+” name1message";
} else if (inputname == “name2”) {
outputname = inputname+" name2message";
}

My problem is this; eventually, I hope to have more names, and I would hate to have to create a new .swf file each time I have to add another
name# . So I was hoping to make it read from an outside source. If I could write that in a txt file, all I would have to do is edit the external file and not have to replace the swf file on my site. Can I do this withou