TextField in a for Loop


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. for (var i:int; i< 3; i++){
  2. var output_txt : TextField = new TextField();
  3. output_txt.text = "MyText" + i;
  4. output_txt.y = i * 20;
  5. addChild(output_txt);
  6. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.