# setChildIndex

**URL:** <https://forum.kirupa.com/t/setchildindex/308871>\
**Category:** flash\
**Created:** [May 2, 2010, 8:06am UTC](https://forum.kirupa.com/t/setchildindex/308871 "2010-05-02T08:06:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fratres](https://avatars.discourse-cdn.com/v4/letter/f/a9a28c/32.png) [@fratres](https://forum.kirupa.com/u/fratres)\
**Post date:** [May 2, 2010, 8:06am UTC](https://forum.kirupa.com/t/setchildindex/308871/1 "2010-05-02T08:06:58Z")

</div>

Hi there, I´m a new flash user from Finland.

I have question concerning “setChildIndex” -function.

I have picture-level (of six pictures). I’ve set mouse\_over function for those (increasing when MOUSE\_OVER)

The problem is that I would want to create function which brings the current(button) - in my code currentbutton is the target which you are pointing at moment - to front and set to back when it become as contentOld.

Any ideas? Thanks…

My Code:

function buttonOver3(e:MouseEvent)  
{  
var currentbutton:MovieClip = MovieClip(e.currentTarget);  
TweenMax.to(currentbutton, 0.5, {scaleX:1.8, scaleY:1.8})  
}

function buttonOut3(e:MouseEvent)  
{  
var currentbutton:MovieClip = MovieClip(e.currentTarget);  
TweenMax.to(currentbutton, 0.5, {scaleX:1.0, scaleY:1.0})  
}
