# Unique identifier problem

**URL:** <https://forum.kirupa.com/t/unique-identifier-problem/166017>\
**Category:** Uncategorized\
**Created:** [October 16, 2005, 5:00am UTC](https://forum.kirupa.com/t/unique-identifier-problem/166017 "2005-10-16T05:00:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sldhana](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@sldhana](https://forum.kirupa.com/u/sldhana)\
**Post date:** [October 16, 2005, 5:00am UTC](https://forum.kirupa.com/t/unique-identifier-problem/166017/1 "2005-10-16T05:00:27Z")

</div>

[right] **Note: Flash 8 Actionscript** [/right]

This might be something simple, but the solution is just eluding me-

I am reading data out of a XML file and based on the XML file, I am creating movie clips dynamically using the code below: -

Obviously, now no matter how many\*\* numOfPeople\*\* I loop through, all movie clips are obviously going to have the same guestName because it has the same identifier. How do I create a **unique identifier** for each new instance of Guest?

for(var i=0; i\<numOfPeople; i++){[indent]if(statusNum == “1”){

var guest\_clip:Guest = new Guest(“guest”+i, this, i);  
guest\_clip.setGuestName(names\*);\*  
_}_

_else …_

- 

[/indent]}\*

\*I tried \*  
_1) **var “guest\_clip”+i:Guest = new Guest(“guest”+i,this,i),**_ but this gives me an invalid identifier error.  
2) \*\*\*var i:Guest = new Guest(“guest”+i,this,i) - \*\*\*this doesnt work either
