Url for txt file in dynamic text field?
Hi, I have a problem with a dynamic text field, which displays a txt file.
If I hardcode the file name in the code, then it works fine. This is on the first frame of my movie, which holds the dynamic text field.
Code:
myData = new LoadVars();
myData.onLoad = function(success)
{
if (success)
{
mytxt.htmlText = this.txt;
}
};
myData.load("test.txt);
stop();
But if I try to define the url of the text with a variable, and try to send it the url in the browser (.swf?txturl=http://www.myurl.com/), it doesn't work:
Code:
myData = new LoadVars();
myData.onLoad = function(success)
{
if (success)
{
mytxt.htmlText = this.txt;
}
};
link = _root.txturl + "test.txt";
myData.load(link);
stop();
Is there a trick to defining url's for dynamic text fields? Because if I hardcode the path from the server, it works locally, but again not on the server...
Any ideas? Thanks!