Might it be possible to only add a single listener to the parent for all buttons?
On Mon, Apr 6, 2009 at 3:10 AM, Rob Romanek <robli...@manibus.com> wrote: > You can try something along the lines of > > var stateButton = getChildByName("State_" + rs[i]); > stateButton.addEventListener(MouseEvent.CLICK, StateButtonClicked); > > hth, > > Rob > > On 5-Apr-09, at 8:33 PM, Graham Pearson wrote: > >> >> What I am trying to do is when I retrieve the recordset back from the >> coldfusion component is to loop through the results like >> >> function GetClientsWithinCategory_Result(rs.Object) { >> for (var i:int = 0; i < rs.length; i++) { >> State_rs[i].addEventListener(MouseEvent.CLICK, StateButtonClicked); >> // The Value of rs[i] will return the 2 letter abriviation of the >> State eg: IN, WI, etc >> } >> } >> >> >> How do I go about combining State_ + the result from rs[i] so that >> when a user clicks on Indiana it will run the actionscript within the >> State Button Clicked Function >> >> > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders