Wrap a single word in a text field

Hello everyone!
I currently have a problem with text data that is displayed in a Flex text field <mx:Text>.
It's a narrow textfield (100px wide) in a animated ad banner that displays content from a database. There are some words that are too long for the available space, so flash wraps some letters to the next line. I have attached a screenshot that shows the actual problem.
The text is shown in a Java web-application as well, and since that Java app is displayed as a normale webpage, there is a lot more space for the text. I cannot put hyphens into the text because it would look weird in the normal web view.
Is there a way to make automatic hyphenation happening when Flash wraps a single word?
It would be perfect to get language-specific correct hyphenation, but a hyphen at the wrong spot is still better than no hyphen at all.
Thanks for your time and help!

I think your simplest bet would be to use mx:label and use the op
tion truncateToFit="true". Also adjust the width so that the text appears prope
rly. Hope this helps..!!

Similar Messages

  • How to set to bold a single word in the text box?

    How can I set to bold a single word in the text box? When I try, it puts the whole text bold.

    you should do this by HTML way
    like this :
    sym.$("your text box Name").html("Hello i'm <strong>Bold</strong> one")
    Zaxist

  • How to copy paste a table structure from word document into Text Field [field format Rich Text]

    In our current implementation we have a Blank page with Text Field [field format Rich Text] on generated PDF Document.
    Once the PDF document is generated, user can copy paste content form any word/rtf document to into the Text Field.
    Pasted content retains all text formatting [Bold, Italic, Underline, Indentation] except the Table format. Text Field is removing table metadata from the content and converting it into plant text.
    Is there anyway to copy paste table structure as it is from word document into Text Field?

    Hi,
    I don't think you can! While you can paste formatted text into the rich text field, the table metadata means nothing to the textfield.
    Niall

  • Word wrap splitting single word

    When I have a line that doesn't fit a single word, instead of trying again on the next parcel where it might fit, TLF (or maybe text.engine)  splits the single word between multiple lines.  Is there any way to change this behavior?

    One my colleagues who works on the Player reminded me that there *is* an option for controlling this behavior in the Player, so I was wrong about that, I'm sorry. The fitSomething parameter to TextBlock.createTextLine would get you what you want. I think it would get you the side effect that a long word might not fit anywhere, so you see the text in the container (and posssibly also other linked containers) stop short because of a long word you can't see (the one that didn't fit). If the long word is at the start of the container, you'd see the whole container empty. But this could be what you want.
    So if you're overriding our code anyway, you could also try changing the way createTextLine is called.
    - robin

  • Need to find a specific word in a Text Field

    I have a text field and I need to be able to perform a function if that field contains (not equals) the word "Excel". Textfield contains the word Excel
    My sample is below
    if (this.rawValue== "Excel") <---- instead of = I want something using wildcards before and after the word "Excel"
         Then do something
    Else
         Do something else

    Hi,
    you can use a regular expression for this task.
    if (this.rawValue.match(/\s+Excel\s+/g)) {
    } else {

  • How to change the text color of certain word in dynamic text field

    i know in html css can done by this <td style="red">You
    are now at <span style="yellow">home</span></td>
    .... the "home" word can change to another color .... any one who
    know this can done in flash , please give some advice or example

    look in the help file for 'setTextFormat', which can be
    applied on a whole
    text field or only part of it.
    "adreny" <[email protected]> wrote in
    message
    news:fb0hon$38q$[email protected]..
    >i know in html css can done by this <td
    style="red">You are now at <span
    > style="yellow">home</span></td> .... the
    "home" word can change to another
    > color .... any one who know this can done in flash ,
    please give some
    > advice or
    > example
    >
    >
    >

  • How to make words in a text field change color in play mode by clicking on them?

    I have a text field on a slide, wanting to change the color of certain words randomly by clicking on them in play mode. I dont know what word in what order will be mentioned by the audience, so I can not set a fixed order in advance.
    Any help is appreciated.
    Thanks a lot.

    create a slide with all the text boxes in place
    duplicate the slide as many times as you have text boxes you want to change colour
    on the second slide, change the colour of one of the text boxes as required
    on the first slide, select one of the text boxes
    open the inspector:     Inspector > Hyperlink >
               enable as hyperlink > link to slide > click slide button > select the correct slide from the drop down menu
    in play mode, clicking on the hyperlink will display the appropriate slide with that text changing colour
    repeate the process for each text box

  • Content of a single line in a text field

    I am loading a hundred string values from a text field (each
    with a <br> after them) into a multiple line Dynamic text
    field set to display html. When a user clicks on any one of the
    lines, I want the content of that line only to be set into a
    variable for further processing.
    any ideas on how to do this simply assuming that the loaded
    in data will be changing quite often?
    thanks

    Use the asfunction protocol to call a function and set the
    value into a
    variable.
    mytxt.htmlText = "<a
    href='asfunction:setValue,test'>Hi!</a>";
    var valuelink:String = null;
    function setValue(value:String):Void
    valuelink = value;
    trace(valuelink );
    Regards,
    Erick Souza | ericksouza.com

  • How to word wrap within text field

    I've created a form with a text field but when filling the form out, the words don't word wrap, but merely go in a single line across the text box field. 
    When can I format the text box to word wrap?
    tks

    I have set my text fields to multi line and the text wraps but it only starts about halfway down the text box.  Please help, this is getting frustrating...

  • Limit the words usage in the text field

    Hi there,
    I need some help here. Is there any method that I can use to limit the usage the words in the text field. Its very helpful to me.
    Thanks

    you can use jformattedfieldtext and use maskformatter to give it a format to limit the number of characters, for example:
    MaskFormatter formatter = null;
    try {
    formatter = new MaskFormatter("####"); //4 numbers only
    } catch (java.text.ParseException exc) {
    System.err.println("formatter is bad: " + exc.getMessage());
    System.exit(-1);
    JFormattedTextField jFormattedTextField = new JFormattedTextField(formatter);
    good luck

  • Expanding text fields side-by-side in a 2 column layout

    Hi,
    I've been trying to create a form that is a 2-column layout. This form contains expanding text fields that are side-by-side with additional form elements underneath. I managed to get the expandable fields to work, however, if the user writes too much in the text field in the left-hand column and it wraps onto a second page, the text field in the right-hand gets pushed to the second page. I am wondering if someone has experience with this and could help me figure out how to make sure the text field in the right-hand column stays in place as the text field in the left-hand column expands onto 2 pages.
    I've tried to wrap each text-field in their own subform that stays fixed, but that seemed to cause the field to expand over the elements below it.
    Take care,
    Carolyn

    Luke23ae wrote:
    for my bachelor-thesis I'm trying to create a 2 column layout in pages. The left column should contain all contents, the right column should only contain notes and additional information supporting the 'main' column. So the right column only contains a little text every now and then. Using the Layout Inspector and setting up 2 columns fills the right column automatically withe the contents overflowing the left column. What I'm hoping to archive is to create a 2 column layout leaving the right column blank, allowing me to insert Text-fields (unless there's a better way) wherever I need to add an annotation.
    Hi Lukas,
    Welcome to Apple Discussions and the Pages '09 forum.
    Since you want the text to flow from page to page in the left column, it would appear best to use a single column for the main text, and to limit the width of that column using the right margin stop.
    That leaves the right half of the page open for a series of text boxes (or shapes, as shown) to contain the notes and additional information.
    I would start with a single text box or shape, resize it to the width you want, then duplicate that one each time you need a new box. That way all your text blocks have a common width to begin with, and if you take care to use only the handle at the center of the bottom edge to resize them, you will not disturb that width setting.
    As noted earlier, the floating objects will not automatically travel with the text they apply to if editing causes that text to move.
    Regards,
    Barry

  • End user have ability to change font style in text field of interactive pdf form?

    Does the end user of an interactive pdf form able to change the font style, i.e.: make something bold or underline a word in a text field?
    I am making a form with text fields and the end user would like the ability to make something bold or underline it.. I do not see anywhere in acrobat that allows styles to be changed.
    I have created the form in Indesign > saved it as an interactive pdf and brought it into Acrobat.

    Thank you for the quick response! Do you set this in Indesign before exporting or do you set this in Acrobat? I am in Acrobat 10.1.10 and when I go to properties it doesn't give me  'options' to choose from.

  • Using Javascript to create concatenated string from checkbox fields to one text field

    Hi. I have a PDF form that I am trying to have output to a spreadsheet that matches my database schema. Here is the dilemna:
    * I have a set of checkboxes for available languages (LANGUAGE_ENGLISH, LANGUAGE_SPANISH, etc.) When they export to spreadsheet, the value is TRUE.
    * I need to take values from checked boxes and create a single string in a text field called LANGUAGE_DISPLAY (so my UI will not need to do the concatenation). If LANGUAGE_ENGLISH is TRUE (checked), append "English, " to LANGUAGE_DISPLAY, else append "". Then, if LANGUAGE_SPANISH is TRUE (checked), append "Spanish, " to LANGUAGE_DISPLAY, else append "". And on and on
    In the LANGUAGE_DISPLAY text field properties, I am inserting a Custom Calculation script to try to achieve this, but am not getting any results. I tried teh following even trying to pull the checkboxes default values and string them together:
    box1 = this.getField("LANGUAGE_ENGLISH").value.toSrting();
    box2 = this.getField("LANGUAGE_FARSI").value.toSrting();
    box3 = this.getField("LANGUAGE_MANDARIN").value.toSrting();
    event.value = box1 + ', ' + box2 + ', ' + box3;
    I also played with this to get the desired strings output...but to no avail:
    if ( LANGUAGE_ENGLISH.rawValue == true )
    box1.rawValue = "English, ";
    if ( LANGUAGE_FARSI.rawValue == true )
    box1.rawValue = "Farsi, ";
    if ( LANGUAGE_HEBREW.rawValue == true )
    box1.rawValue = "Hebrew, ";
    event.value = box1 + box2 + box3;
    Then I tried to simplify to see one field output so used this script...still no results:
    event.value = "";
    var f = this.getField("LANGUAGE_ENGLISH");
    if ( f.isBoxChecked() == true) {
    event.value = "English";
    Couple questions:
    1) Am I on the right track with any of these scripts?
    2) Is there something else I need to do to get the script to run before running the Create Spreadsheet with Data Files comman in Acrobat to get my csv file output? Maybe there needs to be some event to get the checkbox values read by that field in order to calculate/create the string.
    Appreciate any help you can provide.

    LiveCycle Designer has shipped with all Acrobat Professional versions since the "Professional" version was introduced with version 6.
    You do not let us know want results you get in the field or the JavaScript console.
    Using:
    box1 = this.getField("LANGUAGE_ENGLISH").value.toString();
    box2 = this.getField("LANGUAGE_FARSI").value.toString();
    box3 = this.getField("LANGUAGE_MANDARIN").value.toString();
    event.value = box1 + ', ' + box2 + ', ' + box3;
    returns "Off, Off, Off", when no box is checked and returns "Yes" for the appropriate box being checked when the default value is used for the creation of the check box. So if one would make the 'Export Value' of the box from the default value of 'Yes" to the appropriate language, one would get a more desirable result. But for each unchecked box the value would appear as "Off". So one needs to change the 'Off' value to a null string. But one is still left with the separator when there is an unchecked option.
    Using the following document level function:
    // Concatenate 3 strings with separators where needed
    function fillin(s1, s2, s3, sep) {
    Purpose: concatenate up to 3 strings with an optional separator
    inputs:
    s1: required input string text or empty string
    s2: required input string text or empty string
    s3: required input string text or empty string
    sep: optional separator sting
    returns:
    sResult concatenated string
    // variable to determine how to concatenate the strings
    var test = 0; // all strings null
    var sResult; // re slut string to return
    // force any number string to a character string for input variables
    s1 = s1.toString();
    s2 = s2.toString();
    s3 = s3.toString();
    if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
    assign a binary value for each string present
    so the computed value of the strings will indicate which strings are present
    when converted to a binary value
    if (s1 != "") test += 1; // string 1 present add binary value: 001
    if (s2 != "") test += 2; // string 2 present add binary value: 010
    if (s3 != "") test += 4; // string 3 present add binary value: 100
    /* return appropriate string combination based on
    calculated test value as a binary value
    switch (test.toString(2)) {
    case "0": // no non-empty strings passed - binary 0
    sResult = "";
    break;
    case "1": // only string 1 present - binary 1
    sResult = s1;
    break;
    case "10": // only string 2 present - binary 10
    sResult = s2;
    break;
    case "11": // string 1 and 2 present - binary 10 + 1
    sResult = s1 + sep + s2;
    break;
    case "100": // only string 3 present - binary 100
    sResult = s3;
    break;
    case "101": // string 1 and 3 - binary 100 + 001
    sResult = s1 + sep + s3;
    break;
    case "110": // string 2 and 3 - binary 100 + 010
    sResult = s2 + sep + s3;
    break;
    case "111": // all 3 strings - binary 100 + 010 + 001
    sResult = s1 + sep + s2 + sep + s3;
    break;
    default: // any missed combinations
    sResult = "";
    break;
    return sResult;
    And the following cleaned up custom calculation script:
    box1 = this.getField("LANGUAGE_ENGLISH").value;
    box2 = this.getField("LANGUAGE_FARSI").value;
    box3 = this.getField("LANGUAGE_MANDARIN").value;
    if (box1 == 'Off') box1 = '';
    if (box2 == 'Off') box2 = '';
    if (box3 == 'Off') box3 = '';
    event.value = fillin(box1, box2, box3, ', ');
    One will get the list of languages with the optional separator for 2 or more language selections.

  • Text field link

    I need to add a paragraph to a flash file. How can I make a
    word in the text field paragraph link to a separate frame in the
    time line? thanks

    If there is a method for applying timeline commands to words
    in static text, I don't think it would be any less time consuming
    than using invisible buttons over the words, possibly moreso since
    you have to code for each word anyways. AS3 does make button event
    coding a bit more time consuming though.
    AS1/AS2 would make it alot quicker to do this because you can
    simply copy (or reuse) a button and resize it for the word and just
    change the frame number or function call for the code attached to
    the button.

  • Update single word from paragraph

    Hello Members,
    i want to update a single word from the text or paragraph
    e.g i have the line save in the database
    1 "ROBIN paid against Fish Equarium Charges for the month of Oct 2006"
    2 "ROBIN paid against news paper bill for the month of Oct 2006.
    now i want to update the word << Oct >> to << Nov >>
    the user enter the record in the correct way but he enter the narration wrong
    he save Oct instead of Nov
    how it is possible i update all the hundreds of record that save by user
    there is any query who update that word only

    SQL> select x, replace(x, ' Oct ', ' Nov ')
      2  from (
      3  select 'ROBIN paid against Fish Equarium Charges for the month of Oct 2006' x from dual
      4  union all
      5  select 'ROBIN paid against news paper bill for the month of Oct 2006.' from dual
      6  );
    X
    REPLACE(X,'OCT','NOV')
    ROBIN paid against Fish Equarium Charges for the month of Oct 2006
    ROBIN paid against Fish Equarium Charges for the month of Nov 2006
    ROBIN paid against news paper bill for the month of Oct 2006.
    ROBIN paid against news paper bill for the month of Nov 2006.
    SQL>

Maybe you are looking for