PDA

View Full Version : Action Script Problem



jw06
February 8th, 2004, 05:58 PM
Ok ive done evertyhing right so far with making text go to a text box. When i test it with ctrl+enter it works fine.. it reads the .txt's fine. when i upload it they wont load the text to the dynamic box... heres my code:

on (release) {
loadText = new loadVars();
loadText.load("news.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
scroller.text = this.mynews;
}
};
}

And

on (release) {
loadText = new loadVars();
loadText.load("contact.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
scroller.text = this.mynews;
}
};
}

flash4food
February 8th, 2004, 06:28 PM
the coding looks ok, maybe your host doesnt allow loading variables (very unlikely), maybe, i dunno

GreenLantern
February 8th, 2004, 06:35 PM
I would agree with flash4food. Check your server, although unlikely it is possible. You may even have to set the directory so that you are able to read/write to it.

jw06
February 8th, 2004, 07:02 PM
the index.htm and swf files all go in to the www/ directory.. should i change the code to www/contact.txt and www/news.txt?

ScriptFlipper
February 9th, 2004, 04:31 AM
not if the txt-files also are in the www directory.
if they are in the root directory (which holds the www folder) and the flashmovie is in the www directory, the code should be "../contact.txt" without the quotation marks..

jw06
February 9th, 2004, 05:31 PM
:S;S:S:S still not working...