Create and Reference Dynamic Variables created with "for"-how?

Hey all. I am building a Gallery/Case Study application and I am running everything off of XML, and I need to be able to add images/text to the application whenever, without causing any problems. On the sideshow portion of the application, I am putting dynamically generated textfields under the picture viewer, with the number of the current image, highlighted. Similar to the one here: http://edition2.cnn.com/2008/WORLD/europe/03/31/picture.gallery/index.html

Also sorry about the first slide haha this was one of the best examples I could find. Anyway I’ve created the textfields, that display the correct numbers (that is, from “01” until say “07” depending on the .length(); of the XML tag <image>), but that is all they do so far. I am setting the type in the textfields by doing this

_tf.text = "0" + myIndex as String

myIndex is a varibale incrementing as long as var i:Number is less than the length property of the XMLList I’m using to store the image URL’s. I am adding the _tf var to the stage using addChild(); and multiplying i by like 20 or something to make the x values different for every _tf. My problem is that if i try to reference the myIndex value when the textfield is clicked, it says the value of myIndex is 7, which is what it was set to when the last iteration of the loop executed. Basically I need to be able to store a value somewhere, that is unique to each textfield so I can load the corresponding image from my XMLList. I’ve tried messing around with the .name property of MovieClips, but I’m not exactly sure how it works. I use it earlier in the code with my Loader instance, but I don’t know how to use it with MovieClips. I hope I’ve supplied enough info to solve this issue, but if not let me know. Thanks so much in advance!!!