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

you can load a text file using the loadVars object, but you cannot load actionscript in that manner. Basically you can get a string of variables (which seems to suit your situation well). After you load that, you then need to decide how to take it from there.

I have the same issue, but didn’t want to start a new thread…I want my AS, or at least variables for my AS, to load dyamically.

OK so Senocular made it obvious that “dynamic” AS wont work. So basically i can’t just load AS in from a .txt file, right?

Well, what happens if I have a list of variables that will constantly change? Is there any way to have my AS read from an external .txt file?

For example I might have a list of variables that looks like this one day:

total = 3;
text1 = "rats";
text2 = "dogs";
text3 = "cats";

Or it might look like this if i decide to change things around

total = 2;
text1 = "puppies";
text2 = "kittens";

These variables (text1, text2, etc.) are used by my flash movie to make itmems on a drop-down menu. This is why i want the variables easily changeable. So is there any way for me to make my list of variables in an external .txt file and still have flash recognize them (in order to construct the menu)? That way i get flexibility in my menu, but still have it look cool. I’d really appreciate any ideas (i’ve been trying to get a workable menu like this for ages).