# Using Text Area Component content as a variable

**URL:** <https://forum.kirupa.com/t/using-text-area-component-content-as-a-variable/155069>\
**Category:** flash\
**Created:** [July 14, 2005, 3:15pm UTC](https://forum.kirupa.com/t/using-text-area-component-content-as-a-variable/155069 "2005-07-14T15:15:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cubidimagery](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@cubidimagery](https://forum.kirupa.com/u/cubidimagery)\
**Post date:** [July 14, 2005, 3:15pm UTC](https://forum.kirupa.com/t/using-text-area-component-content-as-a-variable/155069/1 "2005-07-14T15:15:14Z")

</div>

Hi all,

I have a problem utilising the information sent to a textarea component (by a radio button group… I want to set the variable result1 to equal the value returned by the radio button - which is sent to the textarea component Q1Result.text

Question1 = new Object();  
Question1.click = function (evt){  
Q1Result.text = evt.target.selection.data;  
trace(Q1Result.text);  
}  
Q1.addEventListener(“click”, Question1);  
this.Q1Result.\_alpha = 0;  
var result1=Q1Result.text;

What I have done returns the value to the Textarea component, but I then cannot get it to go to the variable…

The idea behind this is to have 10 questions as part of a self assessment excerise that will tell someone at the end what profile they are based on the results of this short assessment. For each question there are 5 options (a-e) which are controlled by radio buttons… I want to be able to calculate at the end of the document how many a’s / b’s / etc were returned to determine the profile of an individual (like one of those trashy magazine quizzes)

Any help would be appreciated.

Cheers

Dan
