2 Replies Latest reply on Jul 21, 2006 8:12 AM by Newt99

    Rendering movieclips outlines (rather than fill)

    Newt99

      Hello,

      I'd like to render movieclips outlines rather than having them filled.

      Actually, I would like to achieve the same effect as you get when you click on the color swatches in the Flash timeline layers to see only the outlines of the layer content.

      Is there an ActionScript method or property to set the rendering mode of movieclips ?

      Thanks,
      Karl.
        • 1. Re: Rendering movieclips outlines (rather than fill)
          blemmo Level 1
          I think you have to do this manually, there's no such method or property. You can use the drawing API for this, e.g. with a function that adds an MC to the target MC and draws 4 lines with the coordinates of the target's borders. This could be a prototype method, so you can easily use this like this:

          myMC.drawOutlines();

          The attached code should be in frame 1 of the root MC, so it will affect all MCs in that movie. It draws a red 1 pixel wide border around the target. The target MCs should have their reg point in the upper left corner, otherwise you have to find out the coordinates of that corner and move the border MC to that point.

          hth,
          blemmo

          • 2. Re: Rendering movieclips outlines (rather than fill)
            Newt99 Level 1

            Hello blemmo,

            Thanks for the suggestion. Actually, what I want is not only the bounding box of the movieclips but their actual shape lines.

            Is there a way I can read the coordinates the movieclips is made of so I can draw it with the lineTo() method ?

            Thanks,
            Karl.