Preferred way: dynamically loading text

Which is a more easier/simpler/preferred/more control way of dynamically loading a text from a txt file?

  1. Put a dynamic text Var as: text
 
loadVariablesNum ("text.txt", 0);

  1. A dynamic text instance as: text
 
loadVariables("text.txt", _root.text);

And why…

None of them.
LoadVars is much better.

Preferably you use XML, since .txt files are unhandy, clumsy and alltogether useless in my opinion :stuck_out_tongue:

ill use XML, much more control and browseable in flash :wink:

let me explain why:


<data>
 <holder text="Some text in here you want to load" />
</data>

you can easily get that with:

Xml.load(‘file.xml’)
textdata = Xml.firstChild.Childnodes[0].attributes.text

and you have it :slight_smile:
(didn’t test it, but its hell easy :D)

i don’t know how to use XML…not even sure what it is :stuck_out_tongue:

it can be used as an small database…
it runs on like every type of server, no extra features needed (no php and stuff)…

How do u use that

i tihnk i gotta go n read XML basics :stuck_out_tongue:

oh, found it here
http://www.kirupa.com/developer/mx/multiple_dynamictext.htm