# HTML page as textbox source

**URL:** <https://forum.kirupa.com/t/html-page-as-textbox-source/122>\
**Category:** Uncategorized\
**Created:** [July 5, 2002, 11:39pm UTC](https://forum.kirupa.com/t/html-page-as-textbox-source/122 "2002-07-05T23:39:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kovax](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@Kovax](https://forum.kirupa.com/u/Kovax)\
**Post date:** [July 5, 2002, 11:39pm UTC](https://forum.kirupa.com/t/html-page-as-textbox-source/122/1 "2002-07-05T23:39:52Z")

</div>

How could I create a text box with an HTML page as the source? This way all I would do is edit the HTML page instead of the Flash movie. Similar to [http://allmaple.com](http://allmaple.com) i assume. ANy help is appreciated.

---

<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 6, 2002, 12:08am UTC](https://forum.kirupa.com/t/html-page-as-textbox-source/122/2 "2002-07-06T00:08:26Z")

</div>

I’m barely an intermediate programmer, so I it would take me forever to hack this script out; but conceptually:  
As far as being able to embed actual HTML pages - that would be dope, but Flash _can_ read XML.  
How about a script that converts HTML to XML on the fly and prints the result to a text file? This would probably be slow and impractical.  
OR the simple, built-in approach is to load .txt files formatted in html1.0 - which gives the same effect as in the example site.

The code for this looks like the following:

* * *

//SECTION 1 -LOAD THE TEXT FILE  
loadVarsText = new LoadVars();  
loadVarsText.load(“news.txt”);  
loadVarsText.onLoad = function(success) {  
if (success) {  
trace (“done loading”);  
// SECTION 2 - HTML FORMATTING  
text.html = true;  
text.htmlText= this.textfield;  
} else {  
trace (“not loaded”);  
}  
};

* * *

So the instance name of your text field is “text” (obviously no quotes) and the first line of your text file is “textfield=”.

Then you simply format your news.txt file using the guidlines here:  
[http://www.macromedia.com/support/flash/ts/documents/htmltext.htm](http://www.macromedia.com/support/flash/ts/documents/htmltext.htm)

The above code was written by “oldnewbie” of the [flashkit.com](http://flashkit.com) forums 🙂
