actionscript 3 - How to I keep spark Label from wrapping in the middle of a word? -


i have spark label fixed width, so:

<s:label text="the quick brown fox jumped on thelazydogspackmyboxwithfive dozen liquor jugs." width="400"/> 

the big cluster of words (thelazydogspackmyboxwithfive) extends beyond width, , line breaks after word "over". desired behavior.

but, when use embedded font, no longer happens. line breaks in between "o" , "x" of "thelazydogspackmyboxwithfive". how can keep breaks occurring in middle of words , still use embedded font?

the following works fine me , word break correct, in moves thelazydogspackmyboxwithfive down 1 line when can't fit it.

<?xml version="1.0" encoding="utf-8"?> <s:application xmlns:fx="http://ns.adobe.com/mxml/2009"                xmlns:s="library://ns.adobe.com/flex/spark"                xmlns:mx="library://ns.adobe.com/flex/mx" >      <fx:declarations>         <!-- place non-visual elements (e.g., services, value objects) here -->      </fx:declarations>      <fx:style>         @namespace s "library://ns.adobe.com/flex/spark";         @namespace mx "library://ns.adobe.com/flex/mx";          @font-face{             src:url("knights quest.ttf");             fontfamily: myf;             embedascff: true;         }         .myfont         {             fontfamily: myf;             fontsize:20px;         }      </fx:style>       <s:bordercontainer id="box" width="400" height="200">      </s:bordercontainer>      <s:label text="the quick brown fox jumped on thelazydogspackmyboxwithfive dozen liquor jugs." width="400" stylename="myfont" />  </s:application> 

here how looks :

enter image description here


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -