Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load text file in Flash 8

Status
Not open for further replies.

TMac42

Programmer
Jul 24, 2000
83
US
Is there a new way that we have to load up text from a text file in Flash 8? We are re-using some older code to simply read a text file and display that text in our movie and it continues to come up undefined.

Any help is appreciated

Code:
var Ext_text:LoadVars = new LoadVars();
Ext_text.onLoad = addText;
Ext_text.load("ourtextfile.txt");
trace(Ext_Text.Text.toString());

function addText() {
	movText1.Text1.text = this.Quote;
}
 
In addition, how would I reference the text file if it's in a certain directory off of root on my site?? For example, let's say the Flash files are all in /flash but I keep text files (that are referenced by Flash) in /text.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top