Question
Too many line breaks in imported HTML file
Hi all,
I imported an external HTML file in my stage.
The problem is there are too many line breaks in the text that appear.
For example, my HTML code would be like : <p>Click here <a href="page.html">page</a></p>
And the result on the stage would be:
Click here
Page
So there is a line break after "click here" although there should not!
I don't know how to remove these line breaks
Here is the ActionScript 3 code:
var loader:URLLoader;
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, xmlLoaded);
var request:URLRequest = new URLRequest("home/index.html");
loader.load(request);
function xmlLoaded(event:Event):void {
zonedetexte.htmlText = new XML(loader.data);
}
thanks a see you,
David
I imported an external HTML file in my stage.
The problem is there are too many line breaks in the text that appear.
For example, my HTML code would be like : <p>Click here <a href="page.html">page</a></p>
And the result on the stage would be:
Click here
Page
So there is a line break after "click here" although there should not!
I don't know how to remove these line breaks
Here is the ActionScript 3 code:
var loader:URLLoader;
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, xmlLoaded);
var request:URLRequest = new URLRequest("home/index.html");
loader.load(request);
function xmlLoaded(event:Event):void {
zonedetexte.htmlText = new XML(loader.data);
}
thanks a see you,
David