# Help with dynamic comboBox

**URL:** <https://forum.kirupa.com/t/help-with-dynamic-combobox/296731>\
**Category:** flash\
**Created:** [September 19, 2009, 3:34am UTC](https://forum.kirupa.com/t/help-with-dynamic-combobox/296731 "2009-09-19T03:34:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![badAtAS3](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@badAtAS3](https://forum.kirupa.com/u/badAtAS3)\
**Post date:** [September 19, 2009, 3:34am UTC](https://forum.kirupa.com/t/help-with-dynamic-combobox/296731/1 "2009-09-19T03:34:11Z")

</div>

I am stumped. I have tried to load a comboBox with a for-loop to load k school names and can not get it to load dynamically. Here is what works:

schools\_cb.addItem({label:varLoad.data.school1});

It manages to paste the name of school1 into the comboBox k times.

Then, when I try:

schools\_cb.addItem({label:this[“varLoad.data.school” + k]});

or

schools\_cb.addItem({label:this.getChildByName(“varLoad.data.school” + k)});

it brings up k blank entries in the comboBox.

I am a poor teacher trying to make a signup page for our school’s math contest. Please help…my head hurts from thinking. 🙂

John
