2 Replies Latest reply on May 14, 2009 9:37 PM by ggshow

    Am I losing it?

    C-Rock Level 2

      I have a loop to create a movieclip reference in AS 2.0 from a string. I know this works what is wrong with my loop? I'm part of the beta team for the dot release of Flash did they mess something up with eval()?

       

       

      CODE:

      for(var i:Number = 0; i < 3; i++){
      var tempRef:String = String("printClip"+i);
      trace(i);
      trace(tempRef);
      var ref:MovieClip = eval(tempRef);
      //set(ref, "printClip"+i);
      trace(ref);
      }

       

       

       

      RESULT:

      0
      printClip0
      undefined
      1
      printClip1
      undefined
      2
      printClip2
      undefined