# How do I populate scrolling text field with multidimension array values?

**URL:** https://forum.kirupa.com/t/how-do-i-populate-scrolling-text-field-with-multidimension-array-values/210271
**Category:** flash
**Created:** [December 17, 2006, 1:06am UTC](https://forum.kirupa.com/t/how-do-i-populate-scrolling-text-field-with-multidimension-array-values/210271 "2006-12-17T01:06:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![orlando2004](https://avatars.discourse-cdn.com/v4/letter/o/b5ac83/32.png) [@orlando2004](https://forum.kirupa.com/u/orlando2004)
#### Post date: [December 17, 2006, 1:06am UTC](https://forum.kirupa.com/t/how-do-i-populate-scrolling-text-field-with-multidimension-array-values/210271/1 "2006-12-17T01:06:50Z")

</div>

In my Flash quiz, I have a detailed results page to which I want to post all the questions, answers, and whether the user answered correctly or incorrectly. All this information is stored in a multidimensional array and its successfully showing the results via the trace method.

My question is, what is the syntax for populating a dynamic text field with these results? Do I just write out one long line of AS with the newline command to separate the data? How would I go about applying bold to certain parts of the stored data that I will be showing?

Here is current code for my detailed results page:

[COLOR=#993300]function[/COLOR] showResultsCOLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]  
[COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]“Now showing results”[/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#993300]for[/COLOR][COLOR=#000000]([/COLOR][COLOR=#993300]var[/COLOR] i:[COLOR=#993300]Number[/COLOR] = [COLOR=#000000]0[/COLOR]; i \< NumberOfChallenges; i++[COLOR=#000000])[/COLOR][COLOR=#000000]{[/COLOR] [COLOR=#f000f0]_//This calls the length of the original array (not the spliced copy)_[/COLOR]  
[COLOR=#f000f0]_//trace(NumberOfChallenges);_[/COLOR]  
[COLOR=#f000f0]_//Make sure that the correct answers are marked in the aShuffledChallenges array_[/COLOR]  
[COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]“POPULATING TEXT FIELD WITH A RESULT NOW.”[/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]“QUESTION:”[/COLOR] + aShuffledChallenges[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR][COLOR=#000000][[/COLOR][COLOR=#000000]0[/COLOR][COLOR=#000000]][/COLOR] + [COLOR=#993300]newline[/COLOR][COLOR=#000000])[/COLOR]; [COLOR=#f000f0]_//write out the question_[/COLOR]  
[COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]“ANSWER:”[/COLOR] + aShuffledChallenges[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR][COLOR=#000000][[/COLOR][COLOR=#000000]3[/COLOR][COLOR=#000000]][/COLOR] + [COLOR=#993300]newline[/COLOR][COLOR=#000000])[/COLOR]; [COLOR=#f000f0]_//write out the answer_[/COLOR]  
[COLOR=#993300]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]“Your answer to this question was:”[/COLOR] + aShuffledChallenges[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR][COLOR=#000000][[/COLOR][COLOR=#000000]2[/COLOR][COLOR=#000000]][/COLOR] + [COLOR=#993300]newline[/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[COLOR=#000000]}[/COLOR]

showResultsCOLOR=#000000[/COLOR];
