This is a case where you typically want to create a custom button 
component, say myButton. After you create an instance of myButton you 
pass any info you want it to hold, like the i parameter.
When myButton is clicked it emmits a custom Event (create a subclass of 
flash.event.Event) that holds the i parameter.
You listen for you custom event (not click) and once that is fired you 
pick up the i parameter from your custom Event object, that comes as an 
argument to your listener function.
Or you may want to avoid creating custom Event: listen for Click and 
pick up the i parameter stored within the myButton instance:
event.target.i

I guess there are other ways as well, but I think the ones above are 
the 'cleaner' design-wise.

Reply via email to