Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / July 2008



Tip: Looking for answers? Try searching our database.

Problem Setting TextField.htmlText

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JcFx.Eu - 25 Jul 2008 16:33 GMT
I have the following code:

Console.Debug("SETTING VALUE: ");
Console.Debug(value);
Console.Debug("BEFORE: ");
Console.Debug(_field.htmlText);
_field.htmlText = value;
Console.Debug("AFTER: ");
Console.Debug(_field.htmlText);

(Where value is some HTML passed in, and _field is, you guessed it, a
TextField).

The output of this code is as follows:

DEBUG: SETTING VALUE:

DEBUG: <P ALIGN="LEFT" xmlns:jcfx="http://www.jcfx.eu">
  <FONT FACE="MyArial" SIZE="11" COLOR="#000000">
    [B]Glenn Lawrence[/B]
    <FONT SIZE="7">
      [B]ACIB[/B]
    </FONT>
    <FONT SIZE="8">Director</FONT>
  </FONT>
</P>

DEBUG: BEFORE:
DEBUG: [Traces nothing, showing the field is empty]

DEBUG: AFTER:
DEBUG: <P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="12" COLOR="#000000"
LETTERSPACING="0" KERNING="0"></FONT></P><P ALIGN="LEFT"><FONT FACE="Times New
Roman" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">  <FONT
FACE="MyArial" SIZE="11"></FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="MyArial"
SIZE="11" COLOR="#000000" LETTERSPACING="0" KERNING="0">    [B]Glenn
Lawrence[/B]</FONT></P><P ALIGN="LEFT"><FONT FACE="MyArial" SIZE="11"
COLOR="#000000" LETTERSPACING="0" KERNING="0">    <FONT
SIZE="7"></FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="MyArial" SIZE="7"
COLOR="#000000" LETTERSPACING="0" KERNING="0">      [B]ACIB[/B]</FONT></P><P
ALIGN="LEFT"><FONT FACE="MyArial" SIZE="7" COLOR="#000000" LETTERSPACING="0"
KERNING="0">    <FONT SIZE="11"></FONT></FONT></P><P ALIGN="LEFT"><FONT
FACE="MyArial" SIZE="11" COLOR="#000000" LETTERSPACING="0" KERNING="0">    
<FONT SIZE="8">Director</FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="MyArial"
SIZE="11" COLOR="#000000" LETTERSPACING="0" KERNING="0">  <FONT FACE="Times New
Roman" SIZE="12"></FONT></FONT></P>

All of this is AS 3.0, building with Flex 3 and targeting FP9. My tracing
class prepends the "DEBUG: " to each line of output.

My Question: Where is all the extra Times New Roman junk coming from?

Is this the defaultTextFormat for the field being applied and if so, how to
stop it?

Or, is this some kind of whitespace issue? The text in question is loaded from
an xml file and then parsed as a string property on a business object. If I
prepend and append ">>" and "<<" to the trace of value, I can see there is no
trailing content before or after the <P> tags.

Or, finally, is it something to do with the xmlns  declaration?

Any help would be much appreciated.
JcFx.Eu - 25 Jul 2008 17:07 GMT
In partial answer to myself, this may be a defaultTextFormat issue. If I set an
empty stylesheet on the textfield and then run the code above, I don't get the
junk. I don't get any display either, though (presumably vecause of the empty
stylesheet). Does anyone know how to get the textfield to not do this?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.