Hello,
I am trying to find a more gracefull way to code actionscript entities w/ in a more dynamic fashion.
For instance, I am populating dropdown menus by looping through an XML file.
Rather than addressing the attributes one by one like this:
subnode_2[k].attributes.option_1_branch,
subnode_2[k].attributes.option_2_branch,
subnode_2[k].attributes.option_3_branch...
It rather than addressing each one separately, it would be nice to loop in this manner:
for( var i = 0; i < 10; i++ )
{
if( subnode_2.attributes.option_" + i + "_branch" != undefined )
{
'mc_code_option_'+i+'_dd'.txt_code_value =
subnode_2.attributes.code_value;
}
}
I am trying to find a more gracefull way to code actionscript entities w/ in a more dynamic fashion.
For instance, I am populating dropdown menus by looping through an XML file.
Rather than addressing the attributes one by one like this:
subnode_2[k].attributes.option_1_branch,
subnode_2[k].attributes.option_2_branch,
subnode_2[k].attributes.option_3_branch...
It rather than addressing each one separately, it would be nice to loop in this manner:
for( var i = 0; i < 10; i++ )
{
if( subnode_2.attributes.option_" + i + "_branch" != undefined )
{
'mc_code_option_'+i+'_dd'.txt_code_value =
subnode_2.attributes.code_value;
}
}