[AS2] Changing text in dynamic text field with dynamic instance name

I dont know what I am missing here but what I want to do is change the text inside a dynamic text field via actionscript. the code I am using runs in a loop within a function. Trace is outputting the correct values.


	for(i=0; i<=4; i++) {
		if(_root["order_"+ q]* == 0) {
			["order_"+ i]text = "First";
			trace("first");
		} else if (_root["order_"+ q]* == 1) {
			["order_"+ i]text = "Second";
			trace("Second");
		} else if (_root["order_"+ q]* == 2) {
			["order_"+ i]text = "Third";
			trace("Third");
		} else if (_root["order_"+ q]* == 3) {
			["order_"+ i]text = "Fourth";
			trace("Fourth");
		} else if (_root["order_"+ q]* == 4) {
			["order_"+ i]text = "Fifth";
			trace("Fifth");
		}
	}

basically I want to do this -

order_0.text = "First";

So how can I change this line to work as expected?

["order_"+ i]text = "First";

EDIT- The instance names for the dynamic text fields are set :wink:
Thanks