2 Replies Latest reply on Feb 14, 2007 9:19 AM by SymTsb

    Creating class instances at different depths

    Pop_Clingwrap Level 1
      I have a custom class called line that takes two sets of co ordinates and draws a line between them.
      The class uses _root.createEmptyMovieClip() to make a container to draw in to but I need it to draw in to other movies on the stage in a similar way to createEmptyMovieClip() eg _root.childClip1.childClip2.line=new Line(x1,y1,x2,y2);

      I have tried createEmptyMovieClip(), this.createEmptyMovieClip(), _parent.createEmptyMovieClip() etc but with no joy.

      How can my Line constructor function get the path information from the declaration or do I have to pass it as a parameter?