I quite new to AS and I am now trying to do the following - if possible?!
Flash 8, AS2.
I have a .swf with two dynamic text fields where I want to load two different .txt files - I use embedded fonts via a shared library and I have an external .css file as well.
I have made it work with one dynamic text field and one .txt file, but I want to have a text field on top of my .swf with one type of text and another field beneath it with another type of text…
I am using variables within my .txt file.
I hope someone can help and give me some guidelines as how to continue.
Thanks.
can you combine the two text snippets into one .txt file? that would be easiest.
myLV=new LoadVars();
myLV.onLoad=function(){
textBox1.text=this.firstText;
textBox2.text=this.secText;
}
var Randy:Number = getTimer();
myLV.load(“myText.txt?var=”+Randy); //Randy var ensures that browser doesn’t cache the text file
then in your text file (it’s been ages since i used one), you would have
firstText=I like to drive on the sidewalk&secText=Officer can I get away with a warning?
if you can’t combine into two text files, than either use two LoadVars objects (easy) or use one LoadVars object to load the text files one after another (more difficult, probably more efficient)
does that help?