# Setting Index for a Background

**URL:** <https://forum.kirupa.com/t/setting-index-for-a-background/330666>\
**Category:** flash\
**Created:** [February 24, 2013, 1:59pm UTC](https://forum.kirupa.com/t/setting-index-for-a-background/330666 "2013-02-24T13:59:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blablob](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@Blablob](https://forum.kirupa.com/u/Blablob)\
**Post date:** [February 24, 2013, 1:59pm UTC](https://forum.kirupa.com/t/setting-index-for-a-background/330666/1 "2013-02-24T13:59:53Z")

</div>

Hi again. I have run into another problem with my background; I can’t set the index up correctly. Just to clarify, my background is a separate class of pixels (made to represent stars) which is called by the _Main_ class about 10 times a second.

The problem is that these pixels appear in front of everything else, which obviously ruins the illusion of a background, and I don’t know how or where to set up the \*setChildIndex \*function. Should I set up the index in the _Background_ class itself, or in the _Main_ class? Should I be using a container? (Which I tried but couldn’t get to work.)
