LoadVars (MX)

Hi All…

I am extremely frustrated…I cannot get a simple dynamic text box to load variables from an asp page and access database using LoadVars. It won’t even work with a text file…

I have attached my movie…please someone help!..I have looked high and low for a decent tutorial…but nothing. There are tuts but no examples that strictly RECEIVE data. I am not interested in sending variables but retreiving them using the LoadVars.load method

in my main timeline I have this:

myVars = new LoadVars();
myVars.load(“news.txt”);
_root.newsbox.text = myVars.thenews;

I have a dynamic text box on stage that has an instance name of newsbox and a text file in the same folder as the movie…but yet nothing populates the box!!!

My text file has nothing in it except thenews=testing message

Replace your code with this:

[AS]
myVars = new LoadVars();
myVars.onLoad = function(success) {
if(success){
_root.crap.text = this.thenews;
} else {
trace(“failed to load script”)
}
};
myVars.load(“news.txt”);[/AS]

And your textfile should look like:

&thenews=Whatever news you want to put here.