Textfield in array help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • congay
    New Member
    • Sep 2014
    • 3

    Textfield in array help

    I have a button that saves a users input, and every time that the user presses this save button it sends the input text into a textfield. i already have an array setup with my all my textfields, but it saves one user input to all my textfield

    Here is my array code, and input to text code

    Code:
    public function ctext(): void {
            trace("view is still ", view.visible)
    
            var aTEXT: Array = new Array();
            var nTEXT: Number = 10;
    
            for (var i: Number = 0; i < nTEXT; i++) {
                var newText: tbox = new tbox()
    
                newText.x = view.gg.x + 450;
                newText.y = 88 + i * newText.height + i * 3.8;
                aTEXT.push(newText);
                addChildAt(newText, 8);
                trace(" view", view.x);
                trace(newText.x);
                trace( "this is atext",aTEXT[1]);
    
    
        // this is where the input text is sent to my array of textfields
    
                newText.cn.text = ps1.CN.text, "";
                trace(TEXT.cn.text);
                newText.pn.text = ps1.PN.text, "";
                newText.ad.text = ps1.Ad.text, "";
                newText.ot.text = ps1.OT.text, "";
    
            }
    
        }
    What I need help in, is how can I get it to save in one textfield box at a time, and so on?

    thank you
  • congay
    New Member
    • Sep 2014
    • 3

    #2
    finally, there is no one to help me and I have done, you look at the web gia re, it was wonderful, I had made it.

    Comment

    Working...