instance name of components created dynamically
Hi,
i try to put 2 or more radiobuttons on the stage dynamically (but the problem is the same for any sort of component : Input text, check boxes ...).
I've made a movieClip with the radiobutton inside, with the name bouton for the component.The link to the MC in the library is Radio.
So, i've displayed components with :
var caseH = new lib.Radio();
var caseF = new lib.Radio();
this.addChild(caseH);
this.addChild(caseF);
That works but, after, i try to access one of them :
caseH = document.getElementById("bouton");
caseF = document.getElementById("bouton");
caseH.checked = true;and, of course, it does'nt work cause all the instances have the same name : bouton ! So, caseH and caseF refere to the same last child added, caseF!
How can I access to each component instance ?
Thanks for your reply.
