Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3603224
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:50:44+00:00 2026-05-18T20:50:44+00:00

I have created a dynamic TextArea and want retrieve the value and display in

  • 0

I have created a dynamic TextArea and want retrieve the value and display in the trace.
To run the code below you must drag the TextArea component into the stage.

import fl.controls.TextArea; 
var totalTextArea=5;
     //Create multiple textarea
for(var a:int = 0; a<totalTextArea; a++){
        var cta:TextArea = new TextArea(); 
        cta.move(300,0+(a*100)); 
        cta.setSize(100, 60); 
        cta.condenseWhite = true; 
        cta.htmlText = a+'TextAreaA TextAreaB TextAreaC TextAreaD';  
        cta.name="TA"+a
        addChild(cta);
        trace(cta.text)
        cta.addEventListener(MouseEvent.CLICK, ShowCurrentValue);

}
//accessing TextArea 
function ShowCurrentValue(evt:MouseEvent):void{
        for(var b:int = 0; b<totalTextArea; b++){
            trace("somethingheere.txt")
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:50:45+00:00Added an answer on May 18, 2026 at 8:50 pm

    I suppose you’re clicking in the TextArea.

    function ShowCurrentValue(evt:MouseEvent):void
    {
        var textArea:TextArea = (evt.target as TextArea);
        trace(textArea.name + ": " + textArea.htmlText);        
    }
    

    If you want to list all textareas then I suggest you to put them into an array during creation and iterate over the array:

    import fl.controls.TextArea; 
    var totalTextArea = 5;
    var textAreas:/*TextArea*/Array = [];
    
    //Create multiple textarea
    for(var a:int = 0; a<totalTextArea; a++)
    {
        var cta:TextArea = new TextArea(); 
        cta.move(300,0+(a*100)); 
        cta.setSize(100, 60); 
        cta.condenseWhite = true; 
        cta.htmlText = a+'TextAreaA TextAreaB TextAreaC TextAreaD';  
        cta.name="TA"+a
        addChild(cta);
        trace(cta.text)
        cta.addEventListener(MouseEvent.CLICK, ShowCurrentValue);
    
        // add to array
        textAreas.push(cta);
    }
    //accessing TextArea 
    private function ShowCurrentValue(evt:MouseEvent):void
    {
        for(var b:int = 0; b < textAreas.length; b++)
        {
            var textArea:TextArea = textAreas[b] as TextArea;
            trace(textArea.name + ": " + textArea.htmlText);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created dynamic button with code below, the button caption is too long
I have created a dynamic TClientDataSet component and tried to fire the OnCalcFields event....it
I have created dynamic page with this code and this works fine: var b
I have created a dynamic text field and button. I want to apply UI
I have created a dynamic listview which contains a CheckBox.what I want is at
I have created an Dynamic Component which depend of its options. I just need
I have created a static and dynamic library that I want to distribute. How
I have created a dynamic list picker script using Jquery 1.3 and PHP that
I have created a Dynamic Data site against an Entity Framework Model I have
I have created an editor template for representing selecting from a dynamic dropdown list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.