Skip to main content
June 3, 2008
Question

embedded fonts, tabs and  

  • June 3, 2008
  • 3 replies
  • 641 views
I have an XML file thats being pulled into Flash and having the HTML text displayed. I load in a css file and set all my text fields to the css style sheet.

to get anything with a "tab" to work, I would replace all tabs with a ~t in the XML file and then do a replace in flash with "     " for every instance of ~t it found...

this worked, until I told the text field to embed the fonts..

now it won't work, I can't get anything more than one space, no tabs, nothing.

I even created a class in the css file that had a padding of 300px and told all ~t to have a <span class='tabs'></span> but it didn't do anything (put it to 300 to see if the effect worked, and tried padding-left first..)

so is there ANY way to get more than one space after embedding fonts and using htmlText on a textfield?
This topic has been closed for replies.

3 replies

June 11, 2008
OK, come to find out the &#09; works... EXCEPT if its the FIRST character in a line... like this:

Here is the text thats brought into the function to strip things out and convert it....

Incoming Text:
<span class='an'></span><ul><li><span class='an'>Engine Core</span></li></ul><span class='an'>~t</span><span class='jn'>]</span><span class='an'>  Operations/Component<br>~t~t</span><span class='jn'>[</span><span class='an'> High compressor - driven by a single-stage turbine<br>~t~t</span><span class='jn'>[</span><span class='an'> Combustion chamber, fuel nozzles, igniters<br>~t~t</span><span class='jn'>[</span><span class='an'> Provides most thrust at high altitudes<br>~t</span><span class='jn'>]</span><span class='an'> ITT (thermocouples and gauges)<br>~t</span><span class='jn'>]</span><span class='an'> N</span><span class='jn'>2</span><span class='an'> gauges<br><br><ul><li>Bypass Section</li></ul>~t</span><span class='jn'>]</span><span class='an'> Operations/Components<br>~t~t</span><span class='jn'>[</span><span class='an'> Fan and low compressor - driven by a two-stage turbine<br>~t~t</span><span class='jn'>[</span><span class='an'> Air from fan (bypass air) flows around core of engine<br>~t~t~t- Provides more thrust at lower altitudes<br>~t~t~t- Also used to cool core<br>~t~t</span><span class='jn'>[</span><span class='an'> Air from low compressor is directed to high compressor (core)<br>~t</span><span class='jn'>]</span><span class='an'> N</span><span class='jn'>1</span><span class='an'> gauges</span>

after the converstion it tries to display this:

Outgoing Text:
<span class='an'></span>&#183;<span class='an'>Engine Core</span><br><span class='an'>&#09;</span><span class='jn'>]</span><span class='an'>&#160;&#160;Operations/Component<br>&#09;&#09;</span><span class='jn'>[</span><span class='an'> High compressor - driven by a single-stage turbine<br>&#09;&#09;</span><span class='jn'>[</span><span class='an'> Combustion chamber, fuel nozzles, igniters<br>&#09;&#09;</span><span class='jn'>[</span><span class='an'> Provides most thrust at high altitudes<br>&#09;</span><span class='jn'>]</span><span class='an'> ITT (thermocouples and gauges)<br>&#09;</span><span class='jn'>]</span><span class='an'> N</span><span class='jn'>2</span><span class='an'> gauges<br><br>&#183;Bypass Section<br>&#09;</span><span class='jn'>]</span><span class='an'> Operations/Components<br>&#09;&#09;</span><span class='jn'>[</span><span class='an'> Fan and low compressor - driven by a two-stage turbine<br>&#09;&#09;</span><span class='jn'>[</span><span class='an'> Air from fan (bypass air) flows around core of engine<br>&#09;&#09;&#09;- Provides more thrust at lower altitudes<br>&#09;&#09;&#09;- Also used to cool core<br>&#09;&#09;</span><span class='jn'>[</span><span class='an'> Air from low compressor is directed to high compressor (core)<br>&#09;</span><span class='jn'>]</span><span class='an'> N</span><span class='jn'>1</span><span class='an'> gauges</span>

even though the &#09; is in there, its the FIRST line and it doesn't want to display properly.. any idea why? (basically EVERYTHING is pushed to the left).
Inspiring
June 3, 2008
have you tried to use the #09; instead, i know that Flash is sensitive to the ampersand
June 11, 2008
quote:

Originally posted by: Ben Danis
have you tried to use the #09; instead, i know that Flash is sensitive to the ampersand


ok, the text format thing works only if the line has one tab to the left of it, but I've found out that our developers do "columns" by pressing tab, typing text, pressing tab, etc...

so its not working that way now... and I've tried the #90; thing, but it ONLY displays the #90; and not a tab...

any other suggestions? basicaly I need to replace ANYWHERE there is a ~t (which is the code telling me there is a tab) with something that will represent a tab! :(

robdillon
Participating Frequently
June 3, 2008
You can use <textformat leftmargin="XX" indent="YY"> In the html text to get the equivalent of tab indentations. You can use both positive and negative numbers for the margin and indent values.
June 5, 2008
quote:

Originally posted by: Rob Dillon
You can use <textformat leftmargin="XX" indent="YY"> In the html text to get the equivalent of tab indentations. You can use both positive and negative numbers for the margin and indent values.


Excellent thank you!! I can actually tell it how far to indent now too!!