I struggled with this ad nauseum a while back myself. The number of HTML tags
that work is very restrictive. If you put in the wrong stuff, it may cancel
out everything else. Watch out for nested styles, they can choke Flash. Also,
I found that I couldn't get Flash to recognize vertical spacing with my <p>'s,
so I had to add <br>s for spacing. I'm a bit of a purist, so this bugged me,
but oh well....
I made this site with the intention of using HTML in each of the text fields:
http://www.tamhighfoundation My intent was to create a system wherein I could save individual txt files
with the page contents. These txt files would have HTML. I ended up having so
much trouble that I cut all the HTML down to the basics. I AM using CSS. I
grab the text from a txt file. Below is what I now use for this case. You put
that code in frame 1:
// define documents used
var pageContent = "content.txt";
var cssURL = "core.css";
//Create a new style sheet object
var myCSS = new TextField.StyleSheet();
myCSS.load(cssURL);
// basic setup of content textbox
pageContentBox1.html=true;
pageContentBox1.multiline=true;
pageContentBox1.wordWrap=true;
pageContentBox1.selectable=true;
pageContentBox1.condenseWhite=true; // I like to have readable HTML
pageContentBox1.mouseWheelEnabled=true; // makes it nice for scroll wheels
pageContentBox1.autoSize = true;
loadedText = new LoadVars();
// I like onData versus onLoad, that way I can have just HTML in a plain text
file
loadedText.onData = function(raw) {
pageContentBox1.styleSheet = myCSS;
pageContentBox1.htmlText = raw;
}
loadedText.load(pageContent);
----
Then name the "instance name" of a text box: "pageContentBox1". Note that the
text box must exist in frame 1.
Anyway, I hope that'll help you.
Cheers,
--Will
will@mckinleymedia.com