# Creating Object Names Dynamically Using A Loop

**URL:** <https://forum.kirupa.com/t/creating-object-names-dynamically-using-a-loop/254710>\
**Category:** flash\
**Created:** [March 14, 2008, 3:03pm UTC](https://forum.kirupa.com/t/creating-object-names-dynamically-using-a-loop/254710 "2008-03-14T15:03:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kunstflug\_ASK21](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@Kunstflug\_ASK21](https://forum.kirupa.com/u/Kunstflug_ASK21)\
**Post date:** [March 14, 2008, 3:03pm UTC](https://forum.kirupa.com/t/creating-object-names-dynamically-using-a-loop/254710/1 "2008-03-14T15:03:52Z")

</div>

Hi AS3/FLEX professionals,

I am greenhorn in AS3/FLEX comming from AS2/FLASH8.

I have little problem with handling object arragements by creating IDnames dyamically within a FOR-loop. In AS2 it was simple to realize :

[INDENT][FONT=Courier New]FOR (var n=1 ; n\<=10 ;n=n+1)[/FONT]  
[FONT=Courier New]{[/FONT]  
[INDENT][FONT=Courier New]_root["object_" + n].\_visible = true;[/FONT]  
[/INDENT][FONT=Courier New]}[/FONT]  
[/INDENT]  
[FONT=Arial][FONT=Verdana]Has someone of you profressionals any idea how the syntax has to be in AS3 ?[/FONT][/FONT]  
The problem itself is simple, but simple enough for me to solve. Ⓜ

I would be happy, if someone could give me a hint or better a solution.  
Thanks for helping in advance.

Best regards from Sven.
