# Load text into varaible and split

**URL:** <https://forum.kirupa.com/t/load-text-into-varaible-and-split/53223>\
**Category:** flash\
**Created:** [June 1, 2004, 3:14pm UTC](https://forum.kirupa.com/t/load-text-into-varaible-and-split/53223 "2004-06-01T15:14:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enidea](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@Enidea](https://forum.kirupa.com/u/Enidea)\
**Post date:** [June 1, 2004, 3:14pm UTC](https://forum.kirupa.com/t/load-text-into-varaible-and-split/53223/1 "2004-06-01T15:14:20Z")

</div>

Not sure if this is the best way to do it but I want to have every individual line from a text file.

something like

variable=loadtextfile(“text.txt”);  
variable.split(newline);

textfield.text=variable(2);

thats just something I came up with now, im sure it wont work =/  
can someone tell em how to do this?
