# AS2 Want to add text to ComboBox

**URL:** <https://forum.kirupa.com/t/as2-want-to-add-text-to-combobox/287914>\
**Category:** flash\
**Created:** [May 7, 2009, 7:21pm UTC](https://forum.kirupa.com/t/as2-want-to-add-text-to-combobox/287914 "2009-05-07T19:21:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmimura10](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@mmimura10](https://forum.kirupa.com/u/mmimura10)\
**Post date:** [May 7, 2009, 7:21pm UTC](https://forum.kirupa.com/t/as2-want-to-add-text-to-combobox/287914/1 "2009-05-07T19:21:14Z")

</div>

I’m learning to build quizzes and tests dynamically in Flash CS3 using a combobox component to navigate between questions. Right now I have the combobox populate with the question number but I need it to say “Question” before the number (i.e., Question 1, Question 2, Question 3,…). Here is the code I have so far:

my\_xml = new XML();  
my\_xml.ignoreWhite = true;  
my\_xml.onLoad = function ()  
{  
var info = this.firstChild.childNodes[2].childNodes;  
for (var i=0; i\<info.length; i++) {  
ComboBox.addItem( {label:info\*.childNodes[1].childNodes[0].nodeValue} );  
}  
}  
my\_xml.load(“test.xml”);

If I put "Question "+ before {label:info… I get Question [objectObject] in my combobox.

How can I fix this?
