?
Solved

Add child behind a movie clip in ActionScript

Posted on 2009-05-13
1
Medium Priority
?
859 Views
Last Modified: 2013-11-11
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.
0
Comment
Question by:TonoNam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
flash_expert_ro earned 1000 total points
ID: 24382700
Hello! Yes it`s possible with addChildAt() method. You can use this like addChildAt(child,index);
index should be a depth lower that your MovieClip(wich you want to remain in front).

If you don`t know the depth of this movie clip, just write

addChildAt(your_fire_mc_instance,getChildIndex(your_movie_clip_instance));
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question