[flexcoders] Re: createChildren(): adding 20 identical buttons to panel?

2008-10-22 Thread valdhor
Here is a quick and dirty example on how to add multiple instances as well as how to access them after creation: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:custom=CustomClasses.* creationComplete=onCreationComplete()

RE: [flexcoders] Re: createChildren(): adding 20 identical buttons to panel?

2008-10-22 Thread Tracy Spratt
@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of valdhor Sent: Wednesday, October 22, 2008 11:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: createChildren(): adding 20 identical buttons to panel? Here is a quick and dirty example on how to add multiple instances as well as how to access

[flexcoders] Re: createChildren(): adding 20 identical buttons to panel?

2008-10-22 Thread Mic
Thanks for all the help I was trying to b1 = new Button; this.addChild(b1); this.addChild(b1); this.addChild(b1); etc which is why it appeared that b1 was all used up :-)When adding to the displaylist why does b1 = new Button; have to be done each time? Why can't b1, which is an instance of

Re: [flexcoders] Re: createChildren(): adding 20 identical buttons to panel?

2008-10-22 Thread Paul Andrews
- Original Message - From: Mic [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, October 22, 2008 10:28 PM Subject: [flexcoders] Re: createChildren(): adding 20 identical buttons to panel? Thanks for all the help I was trying to b1 = new Button; this.addChild