Add child behind a movie clip in ActionScript
Posted on 2009-05-13
I have a movie clip called fire_mc. In the time line of fire_mc I have some action script code that makes the movie clip move up randomly and also changes its alpha so that it appears as fire as it goes up. When I add repeatedly many fire_mc to the main time line it will appear as fire. The only problem is that I dont know how to place that animation behind a movie clip. That animation will play fine in front of any movie clip. How could I add several instances of fire_mc behind another movie clip? whenever I use the addChild function it places the movie clip in front of everything else. is there a way to bring a child to stage without placing it in the front?
Another quick question about this animation is that how could I change the color of the movie clip as it goes up. I have changed the alpha, width and height as the fire_mc randomly moves up but my animation will look much better if I could also change the coloer of the movie clip as it moves up. fire_mc is actualy a circle that I converted into a movie clip. Its color is red and it will be nice it it can turn yellow at the top.