# Component setChangeHandler problem

**URL:** https://forum.kirupa.com/t/component-setchangehandler-problem/91699
**Category:** Uncategorized
**Created:** [October 7, 2003, 9:21pm UTC](https://forum.kirupa.com/t/component-setchangehandler-problem/91699 "2003-10-07T21:21:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Bojan](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@Bojan](https://forum.kirupa.com/u/Bojan)
#### Post date: [October 7, 2003, 9:21pm UTC](https://forum.kirupa.com/t/component-setchangehandler-problem/91699/1 "2003-10-07T21:21:53Z")

</div>

hay

here is simple script who put 5 checkBox & 5 radioButton on Scene.

To each of them I define setChangeHandler method which call function that trace component name.

It works but only for checkBoxes. If someone know what’s wrong I’ll appreciate that.

Thanks,

Bojan

help.fla attachment

[AS]yy = 0;  
for (var i = 1; i \< 6; i++) {  
this.attachMovie(“FCheckBoxSymbol”, “check” + i, i);  
this.attachMovie(“FRadioButtonSymbol”, “radio” + i, i + 10);  
this[“check” + i].\_x = 10;  
this[“radio” + i].\_x = 200;  
this[“check” + i].\_y = yy;  
this[“radio” + i].\_y = yy;  
yy += 20;  
//  
this[“check” + i].setLabel("checkBox " + i);  
this[“radio” + i].setLabel("radioButton " + i);  
//  
this[“check” + i].setChangeHandler(“ispisImena”);  
this[“radio” + i].setChangeHandler(“ispisImena”);  
}  
//  
function ispisImena(comp) {  
trace(comp.\_name);  
}
