0 Replies Latest reply on Mar 6, 2008 9:06 AM by Newsgroup_User

    addchild from a class

    Level 7
      I want to add a persons face to a movieClip (faceHolder_mc). The following
      works in my main timeline

      var myFace_mc:faceType1 = new faceType1();
      faceHolder_mc.addChild(myFace_mc)

      However in my baseclass Face of the class faceHolder contains the following
      method


      public function addFace():void
      {

      var myFace_mc:faceType1 = new faceType1();
      this.addChild(myFace_mc) ;

      }

      I have also tried

      faceHolder_mc.addChild(myFace_mc);

      neither work and I get this error

      TypeError: Error #1010: A term is undefined and has no properties.
      at Face/addFace()
      at BRUM3D_fla::MainTimeline/changeit()


      I call the Face Class using the following in the main menu.

      var startFace:Face = new Face();
      startFace.addFace();


      Any ideas?

      R.