# Can you load html text into a flash file?

**URL:** <https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788>\
**Category:** flash\
**Created:** [July 7, 2004, 7:20pm UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788 "2004-07-07T19:20:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![orionstar](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@orionstar](https://forum.kirupa.com/u/orionstar)\
**Post date:** [July 7, 2004, 7:20pm UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788/1 "2004-07-07T19:20:42Z")

</div>

I know that you can load text from a txt file, but is there anyway you can load text from a html file?

Thanks in advance.

---

<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:** [July 8, 2004, 12:37am UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788/2 "2004-07-08T00:37:04Z")

</div>

What do you mean? Html file?

---

<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:** [July 8, 2004, 12:40am UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788/3 "2004-07-08T00:40:55Z")

</div>

Ok, I want to have a client beable to update the text on a swf file, but not have to use a txt file. This way they can use some sort of WYSIWYG editor or something.

---

<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:** [July 8, 2004, 12:55am UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788/4 "2004-07-08T00:55:35Z")

</div>

I have done this before let me try some thing;)

---

<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:** [July 8, 2004, 2:32am UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788/5 "2004-07-08T02:32:33Z")

</div>

var ss:TextField.StyleSheet = new TextField.StyleSheet();  
ss.load(“yourstylesheet.css”);  
content.styleSheet = ss;  
content.multiline = true;  
content.wordWrap = true;  
content.html = true;  
story = new XML();  
story.ignoreWhite = true;  
story.load(“yourhtml.html”);  
story.onLoad = function() {  
content.htmlText = story;  
};

---

<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:** [July 8, 2004, 3:11am UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788/6 "2004-07-08T03:11:55Z")

</div>

nlaffan looks like a winner, mind if you can shed some more light how to use it please?  
Just place it on the first frame and call an html file from the same folder??

Thanks again!!

---

<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:** [July 8, 2004, 5:52am UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788/7 "2004-07-08T05:52:09Z")

</div>

nlaffan’s script looks like it loads css… I would suggest a quick fix would be to use the wysiwyg editor and then rename to .txt.

---

<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:** [July 9, 2004, 8:34pm UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788/8 "2004-07-09T20:34:04Z")

</div>

Have you tried that Dunga? Does it 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:** [July 9, 2004, 9:42pm UTC](https://forum.kirupa.com/t/can-you-load-html-text-into-a-flash-file/56788/9 "2004-07-09T21:42:47Z")

</div>

You could have the WYSIWYG editor save the text it receives to a .txt file.
