# Dynamic .txt file with simple HTML formatting?

**URL:** <https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364>\
**Category:** flash\
**Created:** [June 16, 2003, 11:30pm UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364 "2003-06-16T23:30:54Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![advan](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@advan](https://forum.kirupa.com/u/advan)\
**Post date:** [June 16, 2003, 11:30pm UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/1 "2003-06-16T23:30:54Z")

</div>

Ok… I have a dynamic text box. Fonts embedded, using the flash mx scrollbar component, the dynamic text box’s instance name is “scroller”.

The actionscript code I am using is as follows…

loadVarsText = new loadVars();  
loadVarsText.load(“news.txt”);  
loadVarsText.onLoad = function(success) {  
if (success) {  
trace(“done loading”);  
scroller.html = true;  
scroller.htmlText = this.var1;  
} else {  
trace(“not loaded”);  
}  
};

And… my news.txt file starts with var1=

Everything loads/works fine UNTIL I try using html tags in my news.txt file. The one I need to use is the \<b\>\</b\> bold tag and the font color tags. When I put text inbetween the html tags, nothing shows up. Under my Dynamic Text box properties, the button with \<\> enabling HTML formatting is selected…

absolutely stumped!

thx!

---

<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:** [June 17, 2003, 12:13am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/2 "2003-06-17T00:13:00Z")

</div>

I can’t see anything wrong with your code. Can you post your txt file? I know with color tags, the only way it will work (for me anyhow) is if you use hex, if you don’t, the text will disappear. For instance, instead of:

```php

<font color="LIME"></font>

```

you need to use this:

```php

<font color="#00FF00"></font>

```

Maybe that’s it?

---

<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:** [June 17, 2003, 12:15am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/3 "2003-06-17T00:15:21Z")

</div>

my news.txt file is as follows…

var1=This is a test. \<b\> please bold this text \</b\>

That pumps out just the “This is a test.” and completely ignores the bold text. I even tried using lowercase \<b\>\</b\> tags but no diff.

☹

---

<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:** [June 17, 2003, 12:18am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/4 "2003-06-17T00:18:35Z")

</div>

search the forums! your answer is already there!

* * *

there guys, i joined the search the forums bandwagon

---

<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:** [June 17, 2003, 12:46am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/5 "2003-06-17T00:46:09Z")

</div>

I just did a search and couldn’t find anything close. Either way, your tags were used in the post, but obviously it worked. All I can say is double check everything, maybe try doing it over.

Prstudio - do you know of a thread to explain this? I couldn’t find one.

---

<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:** [June 17, 2003, 1:52am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/6 "2003-06-17T01:52:56Z")

</div>

> \*Originally posted by prstudio \*  
> \*\*search the forums! your answer is already there!

* * *

there guys, i joined the search the forums bandwagon \*\*

actually I did search, tried out a few things but nothing…

hmmm

---

<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:** [June 23, 2003, 12:10am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/7 "2003-06-23T00:10:33Z")

</div>

Although u embedded the font, Flash doesnt include bold and italic automatically. Thats y bold and italic tags may not work.  
To solve dis problem, create an text box using the same font u want, using bold, italic and regular style. Embeed the font.  
Just in case u dont know, if you embed the font in one text field, all text fields in the movie can use it.

\*\*Keep in mind dat embedding the bold and italic style will triplicate the file size. So only embed bold and italic if u really need to use them. \*\*

There it is.  
=)

---

<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:** [June 23, 2003, 2:03am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/8 "2003-06-23T02:03:07Z")

</div>

Or, I think, you can use system fonts that won’t need embedding like one of my favorites, trebuchet MS, or ariel, or sans fonts. They aren’t as fun, but they’ll work.  
:beam:

---

<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:** [June 23, 2003, 2:32am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/9 "2003-06-23T02:32:40Z")

</div>

HTML tags suported by Flash:[AS]\<a href=“url”\>  
\<b\>  
\<font [color="#xxxxxx"] [face=“Type Face”] [size=“Type Size”]\>  
\<I\>  
\<p [align=“left”|“right”|“center”]\>  
\<u\>[/AS]

---

<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:** [June 23, 2003, 4:45am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/10 "2003-06-23T04:45:42Z")

</div>

there’s a technote about that, claudio. 😉

[http://www.macromedia.com/support/flash/ts/documents/htmltext.htm](http://www.macromedia.com/support/flash/ts/documents/htmltext.htm)

---

<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:** [June 23, 2003, 4:51am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/11 "2003-06-23T04:51:54Z")

</div>

Thx Kax =)

Actually i did take dat from the tech note and posted here… i think sometimes ppl are kinda lazy to check the links :beam:

---

<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:** [June 23, 2003, 4:59am UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/12 "2003-06-23T04:59:21Z")

</div>

they will… as long as they are interested in solving their problems. 😛

---

<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:** [June 23, 2003, 5:33pm UTC](https://forum.kirupa.com/t/dynamic-txt-file-with-simple-html-formatting/23364/13 "2003-06-23T17:33:11Z")

</div>

Im attaching an example file.  
=)
