-
I'm trying to display a complete txt file in a dynamic text field. (F8, AS2)
So, there's only one frame. I tried putting this code on the frame without any objects on the stage:
Code:
this.createTextField("superduper", 10, 10, 10, 320, 100);
superduper.autoSize = "left";
superduper.border = true;
superduper.multiline = true;
superduper.wordWrap = true;
var woot_lv:LoadVars = new LoadVars();
woot_lv.onLoad = function (success:Boolean):Void {
if (success) {
superduper.text = woot_lv;
} else {
superduper.text = "Unable to load external file.";
}
}
woot_lv.load("http://sites.google.com/site/televiv2/files/test.txt");
It displays weird stuff in place of "-", space, tab, and going down a line.
The text is supposed to look like this:
Yo, this is a test.
------So I want to try this, see how
well it works. Haha.
-
Hi,
it looks like you want to send the innards of a loadvars object to a text field ...
Have a look at XML onData() method instead
Musicman
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|