IN A NUTSHELL
I have a flash application (made for flash lite - actionscript 2).
When I load in my application an XML File and I process it in an object. I get the correct html input in a textfield.
However if I hardcode the object, all html tags disappear from the .htmlText attribute and there is code placed in front of the text. It is my intention to hardcode the object, since the loading goes a lot fast then xml.
long story short: string.html = true;
deletes all span tags, while I need those. How do I get the span tags in the htmlText of my textfield?
MORE INFO BELOW
In my application I create textfields put some text in them and then set the correct x and y value so they are all nicely put beneath eachother.
inside the function:
//ABOVE I CREATE TEXTFIELD USING THE .CREATETEXTFIELD FUNCTION
this["text" + this._textFieldCounter].html = true;
this["text" + this._textFieldCounter].multiline = true;
this["text" + this._textFieldCounter].wordWrap = true;
this["text" + this._textFieldCounter].autoSize = true;
this["text" + this._textFieldCounter].styleSheet = this._styleSheet;
this["text" + this._textFieldCounter].condenseWhite = true;
this["text" + this._textFieldCounter].htmlText = "<span class=\"page\">" + strHtmlText + "</span>";
//trace(this["text" + this._textFieldCounter].htmlText);
When I trace the htmlText I get
<P ALIGN="LEFT">
<FONT FACE="Times New Roman" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">
//here comes the strHtmlText
</FONT>
</P>
Flash automatically put those p and font tag in front of my text. So my stylesheet won't show the correct style. How do i get rid of the initial align and font tag but still keep the textfield as html?
EDIT
By setting a textformat I have found a way around this problem... HOWEVER
I have a new problem:
In my strHtmlText there are span-tags ( <span class="text-in">blabla</span>
), but this gets filtered out. Why's that ? my stylesheet doesn't do anything without those styles.
(text is loaded from an array)