PDA

View Full Version : dynamic text


aphexburn
02-02-2006, 03:44 PM
I have a text file with 3 different parts that loads into 3 seprate dynamic text boxes. I never have had a problem when I do this with one file and one box.


stop();
var lv = new LoadVars();
lv._parent = this;
lv.onLoad = function(success) {
if (success) {
this._parent.TL1.text = this.content;
this._parent.TL2.text = this.content;
this._parent.TL3.text = this.content;

}
};
lv.load("subpage.txt");



TL1 TL2 TL3 are my instance names for my boxes
var for the content is set to head1, head2 and head3

and my text file looks like this

head1= (some random content would be here)
&
head2= (some random content would be here)
&
head3= (some random content would be here)

When I run my fla i am getting undefined retuned by flash in all of my boxes and i am not sure why

Is there a better way to do this?

Thanks in advance for any help!

also if i wanted to ad a scroll to this does anyone have a link with a good explaination?

aphexburn
02-02-2006, 04:42 PM
here is the answer to my own question. When you are pulling multipule variables from a text field and placing them into their own dynamic text boxes you need to make sure your text file is set up like this

&variablename=
&variablename2=
and so on and so forth

The AS I included in my question is 100% correct, the error was in my text file. I hope this will help someone!