# Short simple problem please help!

**URL:** <https://forum.kirupa.com/t/short-simple-problem-please-help/180342>\
**Category:** flash\
**Created:** [February 27, 2006, 10:47pm UTC](https://forum.kirupa.com/t/short-simple-problem-please-help/180342 "2006-02-27T22:47:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![J\_S](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@J\_S](https://forum.kirupa.com/u/J_S)\
**Post date:** [February 27, 2006, 10:47pm UTC](https://forum.kirupa.com/t/short-simple-problem-please-help/180342/1 "2006-02-27T22:47:51Z")

</div>

Ok i’ve got this code:

j = this.itemLabel.text;  
trace(j); //returns 1  
desc.caption.text = my\_xml.childNodes[project2].attributes.caption[j];

the text field ’ desc.caption’ displays “undefined”, which is not what I want. but when I change the third line to this it works, even though j == 1!!

desc.caption.text = my\_xml.childNodes[project2].attributes.caption1;

what am i doing wrong?!
