3 Replies Latest reply on May 8, 2007 11:37 AM by nelly_1

    Flash Array TextFormat problem

    DaveTheNave
      I have a problem.
      I have a array with information, for each post in the array i create o textfield with information.
      But when i want to use the Textformat, my first textfield wont get textformated (all the other post gets the textformat).. i have tried to solve this problem without any result.

      Here is my code.

      var arraydepth:Number = 1000;
      var yPos:Number = 0;
      for(i = 0; i < arDesigns.length - 1; i++)
      {
      __root.createTextField("lbl"+i, i+arraydepth, 0, yPos, 600, 600);
      _root["lbl"+i].setNewTextFormat(format);
      _root["lbl"+i].text = arDesigns[ i ];

      _root["lbl"+i]._y = yPos;
      yPos += 30;


      var format:TextFormat = new TextFormat();
      format.font = "Arial";
      format.color = 0x0000;
      format.size = 22;
      }

      the result is:
      Text
      Text
      Text
      Text

      Does anyone know were the problem is?