PDA

View Full Version : Preferred way: dynamically loading text



ViNc3
August 9th, 2004, 03:05 AM
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);

2. A dynamic text instance as: text


loadVariables("text.txt", _root.text);


And why...

claudio
August 9th, 2004, 10:56 AM
None of them.
LoadVars is much better.

Galenmereth
August 9th, 2004, 11:00 AM
Preferably you use XML, since .txt files are unhandy, clumsy and alltogether useless in my opinion :p

RvGaTe
August 9th, 2004, 11:11 AM
ill use XML, much more control and browseable in flash ;)

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 :)
(didn't test it, but its hell easy :D)

ViNc3
August 10th, 2004, 02:24 AM
i don't know how to use XML...not even sure what it is :P

RvGaTe
August 10th, 2004, 02:38 AM
it can be used as an small database...
it runs on like every type of server, no extra features needed (no php and stuff)...

ViNc3
August 10th, 2004, 02:42 AM
None of them.
LoadVars is much better.
How do u use that

ViNc3
August 10th, 2004, 02:42 AM
it can be used as an small database...
it runs on like every type of server, no extra features needed (no php and stuff)...
i tihnk i gotta go n read XML basics :P

ViNc3
August 10th, 2004, 03:42 AM
How do u use that
oh, found it here
http://www.kirupa.com/developer/mx/multiple_dynamictext.htm