# Html in dynamically loaded text

**URL:** https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490
**Category:** Uncategorized
**Created:** [September 12, 2002, 11:42pm UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490 "2002-09-12T23:42:02Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![HumanSimulator](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@HumanSimulator](https://forum.kirupa.com/u/HumanSimulator)
#### Post date: [September 12, 2002, 11:42pm UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/1 "2002-09-12T23:42:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 13, 2002, 1:01am UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/2 "2002-09-13T01:01:14Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 13, 2002, 2:34am UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/3 "2002-09-13T02:34:52Z")

</div>

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](http://theapextheory.zandalea.net/six-2.html) in the PhanKlub section if you want. but its just not working for me

PeacE  
-BoB

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 13, 2002, 6:37am UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/4 "2002-09-13T06:37:51Z")

</div>

OOOO, The Apex Theory. Very good band.

If you used kirupas tutorial here… [http://www.kirupa.com/developer/mx/dynamic\_scroller.asp](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…

```auto

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 14, 2002, 1:28am UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/5 "2002-09-14T01:28:23Z")

</div>

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

PeacE  
-BoB

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 14, 2002, 11:01am UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/6 "2002-09-14T11:01:10Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 14, 2002, 2:38pm UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/7 "2002-09-14T14:38:52Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 14, 2002, 2:41pm UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/8 "2002-09-14T14:41:52Z")

</div>

loadText = new loadVars();  
loadText.load(“[http://theapextheory.zandalea.net/six2.txt](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](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](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](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  
};

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 14, 2002, 4:05pm UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/9 "2002-09-14T16:05:46Z")

</div>

loadText = new loadVars();  
loadText.load(“[http://theapextheory.zandalea.net/six2.txt](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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 14, 2002, 5:17pm UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/10 "2002-09-14T17:17:12Z")

</div>

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

PeacE  
-BoB

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 14, 2002, 6:32pm UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/11 "2002-09-14T18:32:14Z")

</div>

Links work fine (I think 🙂 )

pom :asian:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 14, 2002, 7:41pm UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/12 "2002-09-14T19:41:02Z")

</div>

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 \<\>)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 15, 2002, 3:47am UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/13 "2002-09-15T03:47:04Z")

</div>

Thanks you guys. you are always alot of help.

PeacE  
-BoB

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 15, 2002, 3:57am UTC](https://forum.kirupa.com/t/html-in-dynamically-loaded-text/5490/14 "2002-09-15T03:57:37Z")

</div>

No problem.
