FMX need mRNA Decoder Help!

Im trying to make mRNA codon to Amino acid decoder. One that would read, for instance, “UUG UAA” and give you “Leucine STOP”. I’ve been able to create a program that can convert single codons. But can not handle multiple, and only takes the last value.

So if I typed “UUG UAA” it would give me STOP. My current code looks like this:

function onClick(Decode) {
mRNAcodon.text = mRNAcodon.text.toUpperCase();
if (mRNAcodon.text.indexOf(“UUU”) != -1) {
_root.Amino.text = “Phenylalanine”;
} (mRNAcodon.text.indexOf(“UUC”) != -1) {
_root.Amino.text = “Phenylalanine”;
} if (mRNAcodon.text.indexOf(“UUA”) != -1) {
_root.Amino.text = “Leucine”;
} if (mRNAcodon.text.indexOf(“UUG”) != -1) {
_root.Amino.text = “Leucine”;
} if (mRNAcodon.text.indexOf(“UCU”) != -1) {
_root.Amino.text = “Serine”;
} if (mRNAcodon.text.indexOf(“UCA”) != -1) {
_root.Amino.text = “Serine”;
} if (mRNAcodon.text.indexOf(“UCC”) != -1) {
_root.Amino.text = “Serine”;
} if (mRNAcodon.text.indexOf(“UCG”) != -1) {
_root.Amino.text = “Serine”;
} if (mRNAcodon.text.indexOf(“UAU”) != -1) {
_root.Amino.text = “Tyrosine”;
} if (mRNAcodon.text.indexOf(“UAC”) != -1) {
_root.Amino.text = “Serine”;
} if (mRNAcodon.text.indexOf(“UAA”) != -1) {
_root.Amino.text = “STOP”;
}
}
(code continues for another 120 lines)
-mRNAcodon is an input box
-Amino is a dynamic text box
-decode is push button

also note that there are 64 combinations of mRNA codons

Now I’ve been unable to get this code so that when I type more then one 3 character codon “UAC UAA” that it doesnt just give me one result of “STOP”

I need a code will stack it so that if I type “UAC UAA” and hit decode it gives me “Serine STOP”

If you have anything pointing me in the right direction or think you can give me the code. Please post here or Email me at ZionOfRage@netscape.net
Thanks