Hi,

 

I've been pulling my hair out over this one too, and I eventually found
a solution (too late for the project I was working on, but good enough
for the next one!).

 

The problem is to get Flash to embed the font outline for the non
breaking space.

 

There is a file called :

 

C:\Documents and Settings\ian\Local Settings\Application
Data\Macromedia\Flash 8\en\Configuration\FontEmbedding\UnicodeTable.xml

 

That contains all the "presets" in the embed window for a text field.

 

In the glyphRange for Latin I, I did this:

 

<glyphRange name="Latin I " id="17" >

<range min="0x0020" max ="0x0020" /> 

<range min="0x00A0" max ="0x00FF" />  -  here I changed A1 to A0 so it
includes A0 - the unicode for a non-breaking space.

...

 

and to be sure, I added a new glyphRange at the end :

 

<glyphRange name="Non Breaking Space " id="26" >

<range min="0x00A0" max ="0x00A0" />

</glyphRange>

 

and selected this one in the text field too embedded font outlines popup
too.

 

It seems to work fine.

 

Ian 

 

>  Hi

>  

>  thanks for the suggestions.  <br> is no good in this case as I need
the text to

>  stay on the same line.

>  

>  It turns out it is down to using embedded fonts. If I have the text
field set to

>  use any embedded fonts the problem occurs. ie: With the the 'Specify
Ranges'

>  checkbox on in the "Character" dialog of the propertries panel, then
the $nbsp;

>  spaces fail to show up.  I tried Jayson's suggestion of forcing the
inclusion

>  of the space character with the "include these characters" box, but
that

>  doesn't work either.  It works ok with other punctuation characters.

>  

>  For example if I ammend the script to -

>  

>  var somehtml = "Diddy&nbsp;never&nbsp;wanted&nbsp;a&nbsp;nap .,;:";
//note the

>  punctuation characters

>  

>  this.textfield1.html=true;

>  this.textfield1.htmlText = somehtml;

>  

>  then use embedded fonts for the textfield only those punctuation
characters I

>  enter into the "include these characters" box show up. Alternatively
selecting

>  the punctuation category from the "Specfy Ranges" list works as well
for ,.:'

>  etc.

>  

>  However, including the space character, or selecting the punctuation
category

>  from the "Specfy Ranges" list, does not make it show up in htmlText.
This

>  seems to me to be a real bug.

>  

>  Joe

>  

>  ----- Original Message -----

>  From: "Jayson K Hanes" <jayson at 4hci.com>

>  To: <flashcoders at chattyfig.figleaf.com>

>  Sent: Monday, June 14, 2004 7:21 PM

>  Subject: RE: [Flashcoders] non breaking space in html textfield,
Flash MX 2004

>  

>  

>  This works for me:

>  

>  var somehtml = "Diddy&nbsp;never&nbsp;wanted&nbsp;a&nbsp;nap";

>  this.textfield1.html=true;

>  this.textfield1.htmlText = somehtml;

>  

>  ergo, you NEED this line:

>  

>  this.textfield1.html=true;

>  

>  BUT, that's if the [<>] isn't selected in your properties panel.

>  

>  BUT.. I'm assuming you had that enabled otherwise you'd have seen the

>  raw &nbsp;'s.. sooo...

>  

>  WHAT FONT are you using?.. I'm guessing that you have font outlines

>  embedded with certain characters...

>  

>  Try this: in FRONT OF ALL characters listed in "include other

>  characters".. click there, and PRESS THE SPACEBAR.. ie: put a "space
in

>  there". If you have none in there, put a SPACE and a PERIOD " ."

>  

>  Then try it..

>  

>  Hope that helps.

>  

>  -Jayson

>  

>  > -----Original Message-----

>  > From: lists at jlister.f2s.com [mailto:lists at jlister.f2s.com]

>  > Sent: Monday, June 14, 2004 1:20 PM

>  > To: flashcoders at chattyfig.figleaf.com

>  > Subject: [Flashcoders] non breaking space in html textfield, Flash
MX

>  2004

>  >

>  > Hi

>  >

>  > the &nbsp; character does not seem to be working in html textfields
in

>  > when

>  > publishing from MX 2004.  Has anyone else come across this?

>  >

>  > I am using test code as follows

>  >

>  > var somehtml = "Diddy&nbsp;never&nbsp;wanted&nbsp;a&nbsp;nap";

>  > this.textfield1.htmlText = somehtml;

>  >

>  > the textfield displays -

>  >

>  > Diddyneverwantedanap

>  >

>  > although if I copy and paste from the textfield I get -

>  >

>  > Diddy never wanted a nap

>  >

>  > I have trawled the flashcoders archive but no one else seems to be

>  > reporting

>  > this problem, on the contrary &nbsp; seems to be the solution to
many

>  > problems.

>  > The &nbsp; is used extensivily in a large project created in Flash
MX,

>  so

>  > its

>  > sudden failure is a real pain.  Any help appreciated.

>  >

>  > I am publishing to Flash 6, with AS1, using Flash MX2004 on win XP.

>  >

>  > tia

>  >

>  > joe

 

 

 

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to