Html in dynamically loaded text

I feel kinda stupid asking this question but i cant figure out how to get html codes to work with dynamically loaded text files (such as bolding and italics etc…) can someone help.

PeacE
-BoB

Sure thing! Just look at the properties panel while your dynamic text box is selected and look for the symbol that looks like this:

<>

that is the html button.

Good luck!

I did that and had it pushed but it still shows the codes like they are part of the text. you can check it out at http://theapextheory.zandalea.net/six-2.html in the PhanKlub section if you want. but its just not working for me

PeacE
-BoB

OOOO, The Apex Theory. Very good band.

If you used kirupas tutorial here… http://www.kirupa.com/developer/mx/dynamic_scroller.asp (which I highly recommend, it is efficient and easy) I can tell you that the code he gives you looks something like this…


loadText = new loadVars();
loadText.load("kirupa.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
                scroller.html = true;
		scroller.htmlText = this.kirupatext;
};

Not 100% sure on that, but I think it should work.

yeah the scroller works fine and everything shows up but the html wont work.

PeacE
-BoB

Can you post your code? And what do you mean everything works?

okay. just a minute. but i meant that the scroller works and the text loads fine but it wont work with the html.

PeacE
-BoB

loadText = new loadVars();
loadText.load(“http://theapextheory.zandalea.net/six2.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.bios;
};

loadText = new loadVars();
loadText.load(“http://theapextheory.zandalea.net/six2j.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.journal;
};

loadText = new loadVars();
loadText.load(“http://theapextheory.zandalea.net/six2p.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.phanklub;
};

loadText = new loadVars();
loadText.load(“http://theapextheory.zandalea.net/six2t.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.tour;

All four are for a different text box.

PeacE
-BoB
};

loadText = new loadVars();
loadText.load(“http://theapextheory.zandalea.net/six2.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
<B>scroller.html = true;
scroller.htmlText = this.bios;</B>
};

Voila, you have an HTML enabled text box. Just do that to all of your textboxes then you can use HTML in the .txt files. You can only use text formatting tags such as color, font, size, bold, italic, underline, etc.

Oh really. guess that means i cant use links. oh well i will just make a buton. Thanks for your help.

PeacE
-BoB

Links work fine (I think :slight_smile: )

pom :asian:

Yep, just tested it. Links do work… and so do [BR] tags, but that really isn’t important since you can just hit enter in notepad and it will count as a new line anyway.

(NOTE: Replace [] with <>)

Thanks you guys. you are always alot of help.

PeacE
-BoB

No problem.