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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading External text in Dyn Text box 1

Status
Not open for further replies.

brainpudding

Technical User
Sep 29, 2002
84
US
This is probably a basic one for you guys

All i want to do is have a dynamic text field witha scroll bar load its text from a .txt file. dats it
 
Somewhat better explained here... With punctuation and proper syntax... [bigcheeks]





Regards,

cubalibre2.gif
 
Bill i get a page cannot be displayed on your link do those include how to have differnt formationg in the text box? like using html code? I need some lines to be bold and some to be regular. also i got it to load using this .. but do i need all this code?

brief = new loadVars();
brief.load("txt/test.txt");
//assign a function which fires when the data is loaded:
brief.onLoad = function(success) {
if (success) {
trace("done loading");
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
briefing.text = this.var1;
} else {
trace("not loaded");
}
};
 
It's clearly explained on the second half of my second link!

As for Mr Bill Watson, he shuts down his machine when he goes to bed, and by this time (Nova Scotia), Bill's in bed!

Regards,

cubalibre2.gif
 
im al little rusty on the ol html

I want the top line to be bold and then under it regular

UPDATES - BLAH BLAH
this is the regular text

UPDATES - BLAH BLAH
this is the regular text

how would you right that .. when i right it i get these huge spaces between lines
 
Text in the text file should really be on one continuous line, without any linebreaks unless you do want one displayed...
Thus if you want a bold header, and the next line with just one linebreak, you file should look something like this...
Code:
my_text=<b>HELLO WORLD!<b><br>This is the second normal line of text.

Note that's all in one continuous line eventhough it may appear on two lines here on TT.

Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top