Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-12-2007, 01:37 AM   #1
hotelechoyankee
Registered User
 
Join Date: Oct 2007
Posts: 5
Red face Reading text from file advice

i have a large number of strings (short descriptions of things) that i need to access by a string id and use (one at a time) as the text in a TextArea.

i am new to flex and actionscript so the only thing i could think of was creating an associative array of strings and doing something like:
textArea.text = assocArray["stringID"]

it seems like this is a bad idea creating a huge array (there will be hundreds of strings) when the user may only read a few.

how can i store these in another file (text, xml, i don't care) and then access them using a string id?

is this possible? any help would be appreciated
hotelechoyankee is offline   Reply With Quote
Old 10-23-2007, 06:14 AM   #2
drkstr
Flexpert
 
drkstr's Avatar
 
Join Date: Sep 2006
Location: Seattle, WA: USA
Posts: 1,587
Default

You can use the URLLoader class to load text content from an external file on the server. There are examples of how to use a URLLoader in the docs. Post back if you run into any specific problems after giving it try.

Best Regards,
...aaron
drkstr is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading variables from an external text file zaKed ActionScript 2.0 5 11-10-2006 12:44 PM
XML Text & Flash 8 display problem The Low ActionScript 2.0 9 09-29-2006 04:27 PM
setting and reading text file vars ejones ActionScript 2.0 2 05-12-2006 08:11 PM
search a text file with flash rabid lemming ActionScript 1.0 (and below) 0 01-26-2004 06:25 PM
reading lines in an external text file joeri Other Flash General Questions 11 10-25-2002 01:52 PM


All times are GMT. The time now is 05:01 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.