3 Replies Latest reply on Sep 19, 2006 5:59 PM by coldMiner

    help with removeMovieClip() and depths...

    DZ-015 Level 1
      Ok - just one line of code to look at:

      removeMovieClip(mcTransitionImage);

      Looks pretty simple. The problem is, mcTransitionImage has a negative zIndex. I can use swapDepths(), but the code gets pretty sloppy. Is there any way to just set a depth?

      thanks
        • 1. Re: help with removeMovieClip() and depths...
          coldMiner Level 1
          no...
          but mcTransitionImage.unloadMovie();
          should do the trick :)
          • 2. Re: help with removeMovieClip() and depths...
            Rothrock Level 5
            What do you mean by "the code gets pretty sloppy" and "Is there any way to just set a depth?"

            You can use mcTransitionImage.swapdepths(100000) or some such. Doesn't look too sloppy to me and it seems to pretty much just set it to a depth. Have you read the help files? I'm pretty sure this is explained there.

            However, how do you have the clip at a negative depth? Generally that would be because it was created in the authoring environment. But removeMovieClip is not for those. From the help files:

            Method; removes a movie clip instance created with duplicateMovieClip(), MovieClip.duplicateMovieClip(), or MovieClip.attachMovie().

            But you can pop things to a positive depth and then use it, but you may get unpredictable results if the timeline loops. I find it a good idea to keep my timeline stuff and my AS stuff separate. Good luck!
            • 3. Re: help with removeMovieClip() and depths...
              coldMiner Level 1
              depths from -16383 to -1 are reserved for author-time content.
              depth -16384 is reserved for dynamic content that appers beneath all author-time content.
              Can be useful in some cases.