How to create an empty Movie Clip behind other layers?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thvferrari
    New Member
    • May 2007
    • 4

    How to create an empty Movie Clip behind other layers?

    Hey,

    I got an automatic slideshow script. But I want the slideshow to be my background, so it has to be behind all the other layers.

    Does anyone know how to do it?

    Here is the part of the script that creates the EmptyMovieClips

    Code:
    container_mc.createEmptyMovieClip("loader1_mc",2);
    container_mc.createEmptyMovieClip("loader2_mc",1);
    Thnks
  • axis
    New Member
    • Apr 2007
    • 12

    #2
    Code:
    container_mc.createEmptyMovieClip("loader1_mc",2);
    container_mc.createEmptyMovieClip("loader2_mc",1);
    I'm not sure what movieclips your script is refering to, but here's the simplest way to do it:

    Create your movieclips like this:
    Code:
    container_mc.createEmptyMovieClip("slideshow", container_mc.getNextHighestDepth());
    Then do a loop to get the lowest movieclip on the stage. You may want to name your movieClips sequentially to simplify this (eg. loader1, loader2).
    Code:
    mc = this["loader" + 1];
    var lowest:MovieClip = mc;
    for(i = 1; mc != undefined; i++)
    {
      mc = this["loader" + i];
      if(mc.getDepth() < lowest.getDepth())
      lowest = mc;
    }
    slideshow.swapDepths(lowest);
    If you need to keep the current order of depth for each movieclip and stick the slideshow beneath all of them, just let me know and I can modify that script to do that. At the moment, it just swaps the depth of slideshow with the lowest clip (so the lowest clip goes to the top).

    Comment

    • kreid
      New Member
      • Jan 2008
      • 2

      #3
      Hi,

      I am using the same slideshow as you, and I have exactly the same problem. I thought putting the slideshow code in the bottom layer would resolve it, but no.

      Did you ever solve this problem?

      Thanks

      Comment

      • kreid
        New Member
        • Jan 2008
        • 2

        #4
        Hi,

        could you explain your script to an actionscript novice? Is slideshow replacing loader_1 and loader_2? Could you modify it, as you mentioned, to use the lowest depth with the layer?

        Best Regards,
        kreid

        Originally posted by axis
        I'm not sure what movieclips your script is refering to, but here's the simplest way to do it:

        Create your movieclips like this:
        Code:
        container_mc.createEmptyMovieClip("slideshow", container_mc.getNextHighestDepth());
        Then do a loop to get the lowest movieclip on the stage. You may want to name your movieClips sequentially to simplify this (eg. loader1, loader2).
        Code:
        mc = this["loader" + 1];
        var lowest:MovieClip = mc;
        for(i = 1; mc != undefined; i++)
        {
          mc = this["loader" + i];
          if(mc.getDepth() < lowest.getDepth())
          lowest = mc;
        }
        slideshow.swapDepths(lowest);
        If you need to keep the current order of depth for each movieclip and stick the slideshow beneath all of them, just let me know and I can modify that script to do that. At the moment, it just swaps the depth of slideshow with the lowest clip (so the lowest clip goes to the top).

        Comment

        Working...