[quote=Felixz;2326357]ActionScript Code:
[LEFT][COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000]var[/COLOR] i:[COLOR=#0000ff]int[/COLOR]=[COLOR=#000080]1[/COLOR];true;i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p> [COLOR=#000000]var[/COLOR] childName:[COLOR=#0000ff]String[/COLOR]=[COLOR=#ff0000]“head”[/COLOR]+COLOR=#000000[/COLOR];</p>
<p> [COLOR=#000000]var[/COLOR] child:DisplayObject=[COLOR=#0000ff]this[/COLOR].[COLOR=#000000][[/COLOR]childName[COLOR=#000000]][/COLOR];[COLOR=#808080]//this.getChildByName(childName);</p>[/COLOR]
<p> [COLOR=#0000ff]if[/COLOR] COLOR=#000000[/COLOR] [COLOR=#0000ff]break[/COLOR];</p>
<p> [COLOR=#0000ff]if[/COLOR] COLOR=#000000[/COLOR] removeChildCOLOR=#000000[/COLOR];</p>
<p>[COLOR=#000000]}[/COLOR][/LEFT]
[/quote]
Thanks Feliz! I had a feeling you might be the one responding to my post.
I incorporated this without really understanding all the elements. (If you’re so inclined, I would appreciate a line-by-line explanation.) I did get the following error referencing the line containing “[COLOR=#000000]var[/COLOR] child:DisplayObject=[COLOR=#0000ff]this[/COLOR].[COLOR=#000000][[/COLOR]childName[COLOR=#000000]][/COLOR];”:
1084: Syntax error: expecting identifier before leftbracket.
Any help with that?