Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loading variable from .txt file

Status
Not open for further replies.

Jshortest

Technical User
Apr 7, 2007
2
US
I'm attempting to load in a variable from a text file to use in the get_url function. Below is my current code and its simply just not working...

---this is the code layer---
myData = new LoadVars();
myData.load("GSU.txt");
myData.onLoad = function(succes) {
if (succes) {
var varurl;
varurl = this.url1;
title.Text = this.Title;
holder.loadMovie(this.Image);
} else {
trace("Error loading data");
}
};


---Image Layer---
on (release) {
getURL(varurl);
}

 
Code:
var varurl:String = "";
myData = new LoadVars();
myData.load("GSU.txt");
myData.onLoad = function(succes) {
    if (succes) {
        varurl = this.url1;
		title.Text = this.Title;
        holder.loadMovie(this.Image);
    } else {
        trace("Error loading data");
    }
};
stop();

Content of text file...
Code:
&url1=[URL unfurl="true"]http://www.google.com/&Title=Oldnewbie[/URL]



Regards. COMING SOON
TO GET YOUR OWN FREE WEBSITE HOSTING
 
Hi

I've tried this code several times and when i run the movie it only works the second time (press CTRL+Enter, then let the movie run, not data. Press CTRL+Enter again and it works!!)

Any ideas why this is happening?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top