1 Reply Latest reply on Oct 22, 2007 2:50 AM by Greg Dove

    creating a series of text fields in MCs

    fourinchesofego
      Hi, I must be doing something rather simple wrong. I am trying to generate a series of MC each with a text field whose value I can set. Instead I am getting a single one bouncing around the screen. I have done similar things with other objects, but I guess there must be something going on with the text fields???

      I would appreciate help.

      Here is the test code I am using -- the actual development would follow fixing this.

      var obNum = 0;
      function makeText() {
      obNum++;
      var newObject = "myOb"+obNum;
      trace(obNum);
      createEmptyMovieClip(newObject, obNum);
      with (newObject) {
      createTextField("newText", 0, 0, 0, 100, 100);
      newText.text = "monkey"+obNum;
      trace(this.newText.text);
      }
      this._x = Math.ceil(Math.random()*300);
      this._y = Math.ceil(Math.random()*300);
      }
      volumeInterval = setInterval(_root, "makeText", 250);