# List Box

**URL:** <https://forum.kirupa.com/t/list-box/593>\
**Category:** flash\
**Created:** [July 23, 2002, 4:27pm UTC](https://forum.kirupa.com/t/list-box/593 "2002-07-23T16:27:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MXN](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@MXN](https://forum.kirupa.com/u/MXN)\
**Post date:** [July 23, 2002, 4:27pm UTC](https://forum.kirupa.com/t/list-box/593/1 "2002-07-23T16:27:33Z")

</div>

Trying to find out how to get the data from a getSelectedItems pull. All I get is an [object Object],[object Object] array. I get it to select all the items in the list view using an array, but I can not seem to show the data that has been in it. Please advise

Thanks:-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2002, 1:12pm UTC](https://forum.kirupa.com/t/list-box/593/2 "2002-07-24T13:12:29Z")

</div>

Wait a bit, I’ve got a tutorial on the way. If you can’t, what’s your code so far ?

pom :asian:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2002, 2:25pm UTC](https://forum.kirupa.com/t/list-box/593/3 "2002-07-24T14:25:13Z")

</div>

Thxz ilyaslamasse  
Here is the code:

on (release) {  
var items = \_root.data\_window.secreq.peopAdded.getLength();  
var myArray = new Array(0,1,2,3,4,5,6,7,8,9,10,11);

```
for(i = 0; i &lt; items; i++){
     peopAdded.setSelectedIndices(myArray)

```

var myObjArray=\_root.data\_window.secreq.peopAdded.getSelectedItems()  
}

trace(myObjArray)  
gotoAndPlay(“send\_this”)  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2002, 3:27pm UTC](https://forum.kirupa.com/t/list-box/593/4 "2002-07-24T15:27:39Z")

</div>

Got it! Indeed myObjArray contains objects: the label and the data of the selected objects. So if you want to trace the selected objects, you’ll have to

```auto
for(i = 0; i < myObjArray.length; i++){
        trace(myObjArray[i].label);
}

```

Cheers.

pom :asian:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2002, 5:10pm UTC](https://forum.kirupa.com/t/list-box/593/5 "2002-07-24T17:10:55Z")

</div>

I went to lunch, and you beat me to the answer! heheheh

I just love this stuff!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2002, 5:14pm UTC](https://forum.kirupa.com/t/list-box/593/6 "2002-07-24T17:14:45Z")

</div>

Sweeeeeeeeeet  
Thank you very much ilyaslamasse, worked like a charm:) 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2002, 6:41pm UTC](https://forum.kirupa.com/t/list-box/593/7 "2002-07-24T18:41:38Z")

</div>

Cool. You wanna know my secret, Inigo? I never eat. =)

pom :toothin:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2002, 7:36pm UTC](https://forum.kirupa.com/t/list-box/593/8 "2002-07-24T19:36:16Z")

</div>

Is there a way to build an array not knowing how many entries you are going to have: I am filling the list view with items and then selecting them. I want the users to be able to enter in as many as they want. Any suggestions
