I'm pretty new to AS 3.0 and I'm at a loss as to how I should go around using a variable in a function called by the event listener. I have this first function which goes through an xml file and adds a new instance of a movie for every element in the xml like so:
As you can see, it creates a new event listener for each item. How would I use the counter, index1, in selectLog? I'm also thinking that the counter's value will always its last, how would I pass the proper value?
Quote:
function selectLog(e:Event):void {
trace(index1);
}
|
I tried having a variable in the movie clip, and making it equal in each loop to the counter and then access it with e.target.count, but when I clicked on the textfield of the movie clip, it gave me an error.
Thanks a bunch