3 Replies Latest reply on Jan 13, 2010 5:15 PM by kglad

    For Loop within a textfield

    baianomauricioct

      Hi,

       

      I am trying to put this into work, but I am missing something along the line. I need these txtfields to be dinamincally 17pixels apart on the y axis. Does anyone can help me please?

       

      --------------------- Actionscript ----------------------

       

      var tl:MovieClip = this;

      var colnum:Number = 2;

      var txtX:Number = -100;

      var txtY:Number = eval("day"+i._y)+17;

      var txtWdth = 50;

      var txtHgt = 16;

      day1._x = -150;

      day1._y = -65;

      for (var i = 1; i<=15; i++) {

      tl.createTextField("day"+i,tl.getNextHighestDepth(),txtX,txtY,txtWdth,txtHgt);

      tl["day"+i].html = true;

       

      }

       

      Thanks a lot in advance.

       

      --Mauricio