AS3: Element stays on stage after manipulating the index(depth)

Posted by o15a3d4l11s2 on Stack Overflow See other posts from Stack Overflow or by o15a3d4l11s2
Published on 2010-03-24T08:25:36Z Indexed on 2010/03/24 9:33 UTC
Read the original article Hit count: 128

Filed under:
|
|

Here is the problem I have: after I change the index of one movieclip using this code

oldIndex=getChildIndex(DisplayObject(e.target));

setChildIndex(DisplayObject(e.target), numChildren - 1);

when I give the object its old index

setChildIndex(DisplayObject(e.target), oldIndex);

and go to another frame of the movie, this element I have changed the index of stays on top of all elements on the new frame.

My question is am I doing something wrong and if not, what can I do so that this element stays only in the frame it is placed.

© Stack Overflow or respective owner

Related posts about flash

Related posts about flash-cs4