# Loading an external .txt into a variable (AS3)

**URL:** <https://forum.kirupa.com/t/loading-an-external-txt-into-a-variable-as3/296794>\
**Category:** flash\
**Created:** [September 20, 2009, 10:48pm UTC](https://forum.kirupa.com/t/loading-an-external-txt-into-a-variable-as3/296794 "2009-09-20T22:48:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![negow](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@negow](https://forum.kirupa.com/u/negow)\
**Post date:** [September 20, 2009, 10:48pm UTC](https://forum.kirupa.com/t/loading-an-external-txt-into-a-variable-as3/296794/1 "2009-09-20T22:48:12Z")

</div>

Hi, I’m sure it’s very simple, and simplicity is all I’m asking for.

I’m creating part of my code to only be executed if a textfile on my server says it’s okay.  
textfile.txt = “Okay=1 or 0”

I can get it to display in a textfield, but I cannot figure out how to simply put it in a variable for further actionscripting…

So how do I get the text from my external file, into a variable:string?

Thanks,  
negow
