Loading Text from External Sources

  • Jako
  • Banned
  • Banned
  • Jako
  • Posts: 227

Post 3+ Months Ago

I completed this tutorial from kirupa and my final result isn't working...
http://www.kirupa.com/developer/mx/mult ... ictext.htm

I am pertty sure I did all of the coding right cause its on the tut page.
Here is the code for my first button which loads the text1.txt file in the same folder...
Code: [ Select ]
on (release) {
  loadText = new loadVars();
  loadText.load("TEXT1.txt");
  loadText.onLoad = function(success) {
    if (success) {
      // trace(success);
      newsBox.html = true;
      newsBox.htmlText = this.myNews;
    }
  };
}
  1. on (release) {
  2.   loadText = new loadVars();
  3.   loadText.load("TEXT1.txt");
  4.   loadText.onLoad = function(success) {
  5.     if (success) {
  6.       // trace(success);
  7.       newsBox.html = true;
  8.       newsBox.htmlText = this.myNews;
  9.     }
  10.   };
  11. }


not sure why it is not working
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Did you give your textbox the INSTANCE name (not var name) of newsBox? That seems to be a common problem with this situation.

Also, does your textfile start out with "myNews=" and then is followed by the text directly after?
  • Jako
  • Banned
  • Banned
  • Jako
  • Posts: 227

Post 3+ Months Ago

yes i did both of those, but somehow relooked at it and fixed it up...

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 10 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.