3 Replies Latest reply on Jun 3, 2012 7:25 PM by Rothrock

    Naming individual lines drawn within a movieclip

    prodigalmaster Level 2

      Hello, I would like to know if there is a way of putting identifiers on individual lines within a movieclip, or would I have to create multiple movieclips?


      function createWorm(segmentLength, segments):Void {
                _root.createEmptyMovieClip("mcSegment", 1);//creates an empty movieclip
                mcSegment.lineStyle(0);//makes it a line
                var segmentLength:Number;//length of individual segments
                var segments:Number;//how many segments
                for (i=0; i<segments; i++) {
                          mcSegment.lineTo(mcSegment._width+segmentLength,0);//draws each segment to the right of the previous
                this.onEnterFrame = function(){
                          mcSegment._x++;//moves the whole movieclip

      It would be nice to be able to move individual segments not just the whole movieclip.