1 Reply Latest reply on May 5, 2006 6:29 AM by kglad

    How to define a layer

    AnotherRandomFlasher
      say i have created a movieclip

      _root.createEmptyMovieClip("myLine",0);

      how do i define what layer it starts on?

      because im making a paint, and i want a fast and easy way to make it below the paint color panel layer.
        • 1. Re: How to define a layer
          kglad Adobe Community Professional & MVP
          you can control its depth. you used zero in your code.

          you cannot control layers with actionscript. objects created in the authoring environment are assigned a depth by flash and you can control (to some extent) the depths it assigns by placing objects on different layers in the authoring environment.

          if you want to see what depth flash has assigned for a movieclip created in the authoring environment, use the movieclip getDepth() method. if you want to see approximately what depth flash has assigned for a non-movieclip object, sandwich the object between two movieclips and check the depth of the two movieclips.