# setSelectedIndex () \<-- question about this

**URL:** <https://forum.kirupa.com/t/setselectedindex-question-about-this/6495>\
**Category:** flash\
**Created:** [October 8, 2002, 11:39pm UTC](https://forum.kirupa.com/t/setselectedindex-question-about-this/6495 "2002-10-08T23:39:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![babbaladoobala](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@babbaladoobala](https://forum.kirupa.com/u/babbaladoobala)\
**Post date:** [October 8, 2002, 11:39pm UTC](https://forum.kirupa.com/t/setselectedindex-question-about-this/6495/1 "2002-10-08T23:39:42Z")

</div>

Is there a variable that can be placed in -

setSelectedIndex () \<-- here that will tell Flash to go forward (+1)?

this is for an FListbox (if you didn’t know already) - the we are looking to make the highlighted area move down the list automatically

Thank you!!!

Sam

---

<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:** [October 9, 2002, 12:17am UTC](https://forum.kirupa.com/t/setselectedindex-question-about-this/6495/2 "2002-10-09T00:17:05Z")

</div>

depends on where you want it… if we’re following your previous example, you can add the variable to the code in the button, just before you delete your item… here’s the code for your button.

```auto

on(release){

newitem=mybox.getselectedindex();
	
mybox.removeitemat(mybox.getselectedindex());
mybox.setselecteditem(newitem);
}
```

---

<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:** [October 9, 2002, 12:31am UTC](https://forum.kirupa.com/t/setselectedindex-question-about-this/6495/3 "2002-10-09T00:31:47Z")

</div>

thanks - I’ll try that code, and get back to you in this thread -
