3 Replies Latest reply on May 30, 2007 6:42 AM by kglad

    Depth: behaves in a different  way in Flash than on-line

    OlandoCR Level 1
      Dear all,

      This is really weird. I have two categories of movie clips that I add to stage using addChildAt. Basically I establish which one has to go over the other. I do it in this way

      Code:
      var numMC:Number = container.numChildren;
      if (depthMC == -1){
      depthMC = numMC;
      }
      else{
      depthMC = 0;
      }
      container.addChildAt(DisplayObject(instance),depthMC);

      where depthMC is my var to set the depth .

      The funny part is that code works well on Flash but on line works in reverse, I mean those MCs that should go over are under. With this code, it works on line but in reverse in Flash

      Code:
      var numMC:Number = container.numChildren;
      If (depthMC == -1){
      depthMC = 0;
      }
      else{
      depthMC = numMC;
      }
      container.addChildAt(DisplayObject(instance),depthMC);

      Any explanation for that?.

      Thanks