A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Very simple Variable question.

  1. #1
    Member
    Join Date
    Jul 2011
    Location
    United States
    Posts
    37

    Very simple Variable question.

    I am making an array and I would like for the array to gather the information from an input box inside the array. How would I get the so called array to add the information from name_txt?
    Actionscript Code:
    var word = new Array("Hello" + _root.name_txt,"How are you today?");
    Thanks -Seth

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    Hi,

    Supposing you have the text field with the instance name name_txt:
    Actionscript Code:
    var myVar:String = name_txt.text;
    var myArray:Array = new Array(myVar);
    trace(myArray);

  3. #3
    Member
    Join Date
    Jul 2011
    Location
    United States
    Posts
    37
    Yeah I finally figured it out, I didn't add the .text to the end. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center