# How to load text from a txt file to an array?

**URL:** <https://forum.kirupa.com/t/how-to-load-text-from-a-txt-file-to-an-array/253124>\
**Category:** flash\
**Created:** [February 27, 2008, 12:38pm UTC](https://forum.kirupa.com/t/how-to-load-text-from-a-txt-file-to-an-array/253124 "2008-02-27T12:38:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gas2008](https://avatars.discourse-cdn.com/v4/letter/g/51bf81/32.png) [@gas2008](https://forum.kirupa.com/u/gas2008)\
**Post date:** [February 27, 2008, 12:38pm UTC](https://forum.kirupa.com/t/how-to-load-text-from-a-txt-file-to-an-array/253124/1 "2008-02-27T12:38:34Z")

</div>

Hi guys,

I’m working with a Flash gallery that loads picture description from the actionscript that looks like this:  
\*\*  
import mx.controls.CheckBox;  
function title\_name() {  
bigname\_arr = new Array();  
bigname\_arr[1] = [“SOME TEXT HERE FOR PIC 1”];  
bigname\_arr[2] = [“ANOTHER TEXT FOR PICTURE 2”] ;

} //bigname\_arr[insert photo#] = [“INSERT PHOTO DESCRIPTION”]; (to add more images copy the code and past on above. To remove photo and description, delete code from above)  
title\_name();  
\*\*

My question is how do I load instead of SOME TEXT… my own custom text from the txt file?

Now, for changing the description of the images I have to change the script itself.

**It is Flash 8 Actionscript.**

Any help would be much appreciated! Thank you!!!
