actionscript 3 - splitting values and putting it in a text box in AS3 -


I am entering a set of 4 values ​​in a text box and I want to make it a blower in 4 different small text boxes This code displays in the way:

  Sarabeshoot (number (T1 text)); Array.push (number (t2.text)); Array.push (number (t3.text)); Array.push (number (t4.text)); B2.addEventListener (MouseEvent.CLICK, Act 2); // First button click function act1 (Event: MouseEvent): array {var input: string = tt.text; Array = input.split (""); T1.text = array [0]; T2.text = array [1]; T3.text = array [2]; T4.text = array [3]; }   

But now I have to know how to do the same for a dynamic value.

Say I have a text box TT1 and a button B1. When I enter any value (say 6) this number text boxes (new text boxes, T1, T1 .... T5 with 6 names) have been created

I have Another text box is TT2 and a button B2I when I enter a set of values ​​in it (say 10,66,33,45,2,4) I need to see these values ​​in those text boxes Which is T, T1, T2 ..

Is it possible?

This snippet will make your textfield

  // This is our new textfield Werches will be textfield: array = new array (); Function Handlebratfeld (E: Event): Zero {// has been named for the number of fields to make your textfield, named after TF Newfold's name: int = parseInt (tfNumfields.text); {Var tf: TextField = new TextField (for var i: int = 0; i & lt; count; i ++); Tf.x = 100; Tf.y = 100 + i * 30; AddChild (tf); }}   

This snippet will split the content of your textfield into several text fields

  function handle Cretefield (E: Event): zero {// your The values ​​for the text file are named tfValues ​​var value: Array = tfValues.split (""); (Var i: int = 0; i    

Comments