PDA

View Full Version : Loading variables from Loaded txt files


cubidimagery
05-25-2005, 02:36 PM
I have a file that loads an external textfile... simple enough...

upon loading this loads a variable into a textfield...

i then have a menu that contains a selection of buttons that are to load variables from the loaded textfile into the same textfield...

Basically I want a function that will switch a variables name or tell me how I can load different variables from a txt file into the same dynamic text field.

If that doesn't make sense please let me know

quincewyss
05-25-2005, 03:15 PM
basically you can just add to the text area by adding to your original variable.

so if you have :
var shizzle:String = "";
var hope:String = "ten twenty-two";
var nohope:String = "thirty three";
shizzle:String = hope;
//then another var----
shizzle:String = shizzle + " " + nohope;

now as long as your dynamic text is looking for the var shizzle the will work.

I would recommend passing the text in as variables with xml rather than directly.

I hope this is what you were talking about.