
I’ve spend a lot of hours researching this problem, and nothing has worked so far.
I have a simple text file that I’m loading into a dynamic text box. I want to get one line spacing between the lines, not two like a carriage return seems to give me. So I understand the way to do this is with Html rendering.
So I click the html render button for my text box, add a ‘<br />’ to my text file, but still no good - it just displays the ‘<br />’
Here’s my dynamic text box code:
———————————–
var textRequest:URLRequest = new URLRequest("gigguide.txt");
var textLoader:URLLoader = new URLLoader();
textLoader.load(textRequest);
textLoader.addEventListener(Event.COMPLETE,fileLoa ded);
function fileLoaded(event:Event):void {
text_field.text = event.target.data;
}
—————————————
and here’s my text file:
item1<br />item2
I’ve tried adding:
text_field.html = true;
text_field.htmlText = event.target.data;
to the code, but I get an error saying the term html is undefined.
I’m using AS3
Cheers for any light you can throw on this.
Shaun
If you would like to make a comment, please fill out the form below.
Recent Comments