# Changing index values

**URL:** https://forum.kirupa.com/t/changing-index-values/306456
**Category:** Uncategorized
**Created:** [March 15, 2010, 10:37pm UTC](https://forum.kirupa.com/t/changing-index-values/306456 "2010-03-15T22:37:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)
#### Post date: [March 15, 2010, 10:37pm UTC](https://forum.kirupa.com/t/changing-index-values/306456/1 "2010-03-15T22:37:33Z")

</div>

Hi - I have created a ‘border’ MC on the timeline.  
I then add an MC dynamically with as3.

I want the border mc to be ‘on top’.

When I do

```auto
this.setChildIndex(border,2);

```

I get the error ’ supplied index is out of bounds’ …

Why is this? Can I not swap depths of timeline objects?  
Thanks
