Hello all,
I am having a problem with external text and style sheets. For some reason, when I end a paragraph with </P> the text after that is cut off. The strange thing is, it works for some copy, generally the first <p class… call. I can close that, but then I’ll have one after the next block of copy and everything is lost.
Here’s my code that I am using and an example of the copy that is loading incorrectly.
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
myStyle.load("main_styles.css");
output.styleSheet = myStyle;
output.multiline= true;
output.wordWrap = true;
output.html = true;
output.selectable = true;
var story:XML = new XML();
story.ignoreWhite = true;
story.load("text/textexample.txt");
story.onLoad = function () {
output.htmlText = story;
}
Here’s the text.
<html>
<body>
<p class="title">TITLE</p><br>
<p class="bodyCopy">SUBHEAD</p>
<p class="bodyCopy">Body copy goes here.
<p class="headline">List<br>
<span class="headline_smallGrey">One a</span><br>
<p class="wheretobuylist">List Item<br>
<span class="headline_smallGrey">Two</span><br>
<p class="wheretobuylist">List Item<br>
</body>
<html>
So, if I add at </p> to the end of <p class=“bodyCopy”>Body copy goes here., everything else gets cut off. In fact, if I add a </p> pretty much anywhere it will get cut off. So the question is, what is going on here. how can I control the CSS styles? Thanks!