Accessing Dynamic Variables

Hi Folks,

I have the following code that populates the variable from an array

var divergent1 = resultarr[0].step_no ; // This Gets the val “Step1”
var divergent1 = divergent1.charAt(4); // This gets the value 1

I need to send it to a mc based on the number

parent[bar_A_mc]["a" + divergent1].gotoAndStop(2);

What is wrong with the above code

_parent.bar_A_mc.a_1.gotoAndStop(2); // This works but need dynamic

Thanks

RG