Problem with creating a container with the single line of text

Hi ~
I'm overwhelmed with a following problem.
Problem: I need to create a container with a single line of text. As I learn from the TLF API, there is no way to do that so he left only in a way that looks like this:

Assuming that textFlow object is to create
var container: Sprite = new Sprite();
var width: Number = 500; It has specified the value
var height: Number = 300; just estimate is sufficient for a normal line height
var controller: DisplayObjectContainerController = new DisplayObjectContainerController (container, width, height);
controller.verticalScrollPolicy = ScrollPolicy.OFF;

textFlow.flowComposer.addController (controller); textFlow.flowComposer.composeContainer (textFlow.flowComposer.getControllerIndex (controlled r));

find the first line of the top in the created container
var textFlowLine:TextFlowLine = textFlow.flowComposer.findLineAtPosition (controller.absoluteStart, false);
var calLineHeight:Number = textFlowLine.textHeight + 8; 8 this is just a test value
controller.setCompositionSize (width, calLineHeight);
textFlow.flowComposer.updateContainer (_textFlow.flowComposer.getControllerIndex (Controller));


In this way, she first calculate first line height giving enough space for the controller
and cope, after that there adjust the height of the container again and then updates.
It's so fresh generals I guess

If anyone has more simple or just how?

In regards to a single line. I think you can set the lineBreak on the TextFlow to "explicit". In this case lines only break to return to the line and the point ends.

If you want to be changed, take a look at the TextLineFactory APIs. NaN set in the width/height of the limit and it gets filled. It is a more lightweight way to create TextLines.

Take a look at the properties DisplayObjectContainerControllers compositionWidth and compositionHeight full TextFlows as in your code using. You still want to use explicit line breaks.

Hope that helps!
Richard

Tags: Adobe Open Source

Similar Questions

  • Problems with the blur effect on text in 3D

    I don't know if is ' t a bug or I have something running, but when I do a text layer, blur works fine, but when I turn on the 3D and even 3D per character, the blur stops working.

    Pic 2.png

    Here it is with the 2D and 3D text:...

    Pic 1.png

    Still, I don't know if this is a bug, so I'm just something wrong, but I make it work once, but after 8 hours of work on a project, had everything perfect, ready for rendering, Ae crashed, and when I opened the project, while blurring had been removed, with no way to restore the it. If anyone else has this problem and find a way around it, I'd love to know how, but any help is greatly appreciated at all.
    And staff, if it is a bug, it's a very frustrating. > XO

    Try to set your composition to a final rendering of quality Panel.  Your model is sent to the quick project. If that does not resolve the problem, let us know. It would also be useful to know the version of your OS.

  • Problem with the display of alt text

    Hi guys, I have a strange problem here. my www.gogua.gr site cannot display alt text and I can not find the error, can you help me?

    Your website doesn't have a problem with the replacement text apart from the fact that you use innapropriately.  What I think you are looking for is 'ToolTip' that IE displays when you hover an image with alt text?  If so, that is to say wrongly uses the alt text and Firefox is correctly I think that, with the title attribute.  It isn't your site that may or may not display the text, this is the browser.

    With regard to the use of alt text to say 'click to enlarge', this isn't such a good idea.  The use of the text is to provide an alternative text for the image in case a viewer is not the images displayed, or uses a screen reader.  It should be used to describe the image.

    Martin

  • Graphics problems with a single line at the top.

    During bootup until I perfect video resolution, but after starting windows I have a single line of the video of the ideas would be useful. I already checked the wiring, video card and the BIOS settings. Anyone had this problem? This had beat me my head against the wall for a week now.

    I'm just guessing that you have a problem with
    your video driver. Maybe the info will be
    be useful...

    Good luck...

    What happens if you start in Mode safe?

    (315222) a Description of the Safe Mode
    Boot into Windows XP options
    http://support.Microsoft.com/?kbid=315222

    How to start safe mode in Windows XP
    http://bertk.MVPs.org/html/SafeMode.html

    If you start correctly in safe mode... it can
    be worth a try to roll back your video driver.

    (306546) HOW to: use the driver to restore roll back feature
    a previous Version of a device in Windows XP driver
    http://support.Microsoft.com/default.aspx?scid=kb;en-us;306546

  • What is the problem with this single line of Java code in the software special approval BPEL code?

    Hello

    My java code does not build in jdev if I leave this line in java tissue BPEL code

    Criteria of SearchCriteria = new SearchCriteria (AttributeName.USER_LOGIN.getId (), une_chaine, SearchCriteria.Operator.EQUAL);

    With the help of Jdev 11.1.1.7.0

    oimclient is inside of the SCA-INF/lib, manifest says it is version 11.1.2.2.0

    Error message does not say much

    at com.collaxa.cube.lang.compiler.template.CubeProcessGenerator.compile(CubeProcessGenerator.java:313)

    at com.collaxa.cube.lang.compiler.template.CubeProcessGenerator.generate(CubeProcessGenerator.java:169)

    at com.collaxa.cube.lang.compiler.BPEL1Processor.transform(BPEL1Processor.java:257)

    at com.collaxa.cube.lang.compiler.BPEL1Processor.process(BPEL1Processor.java:161)

    at com.collaxa.cube.lang.compiler.CubeParserHelper.compile(CubeParserHelper.java:47)

    at oracle.fabric.bpel.bpelc.BPELComponentValidator.validate(BPELComponentValidator.java:40)

    at oracle.soa.scac.ValidateComposite.validateComponentTypeServicesReferences(ValidateComposite.java:1066)

    at oracle.soa.scac.ValidateComposite.doValidation0(ValidateComposite.java:514)

    at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:493)

    at oracle.soa.scac.ValidateComposite.run0(ValidateComposite.java:214)

    at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:195)

    at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:187)

    Do I need exactly the same version of jdev to oimclient?

    TIA

    Leo

    Well it seems to work when I remove all imports, even classes in java.util. as map, list, etc.

  • problem with the easy line of site Web

    I have a problem with a site called easy line. It's using words on my ebay page to link to advertisements.

    No idea how I can get rid of him?

    Do a check with some malware malware, analysis of programs on the Windows computer.

    You need to scan with all programs, because each program detects a different malicious program.

    Make sure that you update each program to get the latest version of their databases before scanning.

    Alternatively, you can write a check for an infection rootkit TDSSKiller.

    See also:

  • problem with the backup data in text file

    Hello

    The problem I am facing wihile, saving the data in the text file is that everytime when I'm slecting the path of the façade, data that are recorded are added with the previous data, not only in the new text, the new data set is saved but also, is there any previuos run for the program , the corresponding data is also present in this text file.

    However, when I change the same ''(file path) to 'constant' in the control block diagram, and then add the path of the file, it doesn't have this problem. Basically, changing the "file path" constant in the diagram of control block (so that it is displayed in the front panel) is at the origin of the problem.

    Help, please!

    Thank you

    Your shift on the loop Register For is not initialized. It will keep the value of the string since the last time that he performed. That initialize and it should solve your problem.

  • Problem with the new line when you manually run a procedure in SQL * more

    The procedure below works fine in SQL * more when all EXEC < procedure_name > (parameter1, parameter 2,...); is placed on a single line
    SQL > exec cust_admin_util.create_schema (P_SCHEMA_NAME => 'SCOTT_01', P_SCHEMA_PWD => 'scott123', P_TBS_NAME => 'TRAG_TBS', p_temptbs_name => 'TEMP' );
    
    PL/SQL procedure successfully completed.
    I wanted to perform the same procedure with readability. So, I put each parameter on a separate line and try to run. But it's the slightest mistake out.
    SQL > exec cust_admin_util.create_schema
    (
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );BEGIN cust_admin_util.create_schema; END;
    
          *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'CREATE_SCHEMA'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    
    
    SQL >   2    3    4    5    6    7
    P_SCHEMA_NAME => 'TESTUSR_01',
    *
    ERROR at line 2:
    ORA-00928: missing SELECT keyword
    No work around for this?

    Tom wrote:

    No work around for this?

    BEGIN
    cust_admin_util.create_schema
    (
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );
    END;
    /
    

    SY.

  • Problem with the command line APEXEXPORT after upgrading to 3.2

    Hello

    After the upgrade to 3.1.2 to 3.2 Apex (upgrade went well), I get the following error message when you try to do an export of command-line applications:

    Exception in thread "main" java.lang.UnsupportedClassVersionError: oracle/apex/APEXExport (unsupported major.minor version 49.0)
    at java.lang.ClassLoader.defineClass0 (Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    in java.net.URLClassLoader.access$ 100 (URLClassLoader.java:55)
    in java.net.URLClassLoader$ 1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged (Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

    Any ideas? It worked perfectly fine before the upgrade... I use Oracle 10.2.0.4 database JDBC jar files.

    Thank you
    Matthias Hoys

    Hello

    Machines virtual Java is backward compatible, so you can use the JDBC 1.4 with JVM 1.5 or later without problem, no need to download new classes.

    And Yes, I think that it is best to go directly to JDK1.6... Here I have 1.6 and use the tool to export Apex with the 10g JDBC classes without problems.

    Luis

  • Problems with the filling of a text field with 2 other fields data


    I have 3 domains Tools_1a_pri, Tools_1a_pri_other, Tools_1a_pri_txt.

    Tools_1a_pri is a drop-down list box with a predefined list. One of the options is the 'other '.  If 'Other' is selected, the text Tools_1a_pri_other field becomes visible for users to enter the name of the other tool.

    The Tools_1a_pri_txt is a text field with a calculation that shows a text indicating that no tool has been selected or the Tools_1a_pri & or Tools_1a_pri_other.

    When I select one of the predefined tools, everything works.  When I choose the other, it seems that nothing has changed.  Must I click another field before.  It's confusing for the user.

    Tools_1a_pri validate code
    this.getField("Tools_1a_pri_Other").display = event.value is "Other"? Display.visible: display.hidden;

    Computer Tools_1a_pri_txt code
    If nothing is selected, follow these steps
    If (getField("Tools_1a_pri").value.length < 2) {}
    event.target.textColor = color.red
    Event.Value = "no identified main tool";
    } else if (getField("Tools_1a_pri").value! = 'Other') {}
    If not do that if the other is selected
    event.target.textColor = color.black
    Event.Value = getField("Tools_1a_pri").value;
    } else if (getField("Tools_1a_pri").value = 'Other') {}
    If not do so if the other is not selected
    event.target.textColor = color.black
    GetField("Tools_1a_pri").value = Event.Value + "-" + getField("Tools_1a_pri_Other").value;
    }

    You have made the classic mistake of using the assignment operator in a statement instead of the comparison operator. Change this line:
    } else if (getField("Tools_1a_pri").value = 'Other') {}

    To do this:

    } Else if (getField("Tools_1a_pri").value == 'Other') {}

  • Problem with the caption.value. #text

    I'm do my first measures in the FormCalc language to create PDF Forms to distribute , et what I have to do here is to try to change the caption text of a text field based of a decision made previously by a drop down field in the small script I tried to write it as follows:

    var text = Choose ()Elenco1.rawValue ""request number""", " "number required"""( )

    if ()Elenco1.rawValue == 1( ) then
    $ . Caption.Value . text.value # text =
    $ . RawValue Num2Date = (Date (), "YY / MDD_IHS)
    ElseIf ()Elenco1.rawValue == 2( ) then
    $ . RawValue Num2Date = (Date (), "YY / MDD_UNI)
    endif

    but fails in the first line . What is the problem ?
    Ascolta
    Fonética Partitura

    You can change the caption TextField1 when running at below the syntax help.

    $.resolveNode("__TextField1__.caption.value.#text").value = "New Caption";

    Thank you

    Srini

  • Problem with the help of new text Input componentin D11.5

    I have a text Input component (marked with symbol ab in the Toolbox), called him studNameTF.

    The user must write his name, and then click button to go to the next section.

    The button is check wethere the entry is empty or nott, if it is empty, then it sotps the user and alert the user to write the name in order to proceed.

    The problem is that I have fills with text name field and press the button. The button does not catch the content of ICTand stops the user even the field contains text.

    Here's my lingo script.

    on mouseUp me

    If member("studNameTF").text = EMPTY then
    Alert ("Please write your name in order to go forward!")
    go to the section
    on the other
    go to the section "menu.
    end if


    end

    What is strange to me is that this code works fine when I use a regular text field (marked with has in the tollbox) rather than the new text input component which is a flash-style text field.

    any help is appreciated!

    HUMAN RESOURCES

    If you are using a #flashComponent, the text is probably a function of the sprite, not the Member.  In order to check

    Sprite (spriteNameOrNumber) .text

    instead of member("membername").text

  • problems with the command-line command pc

    on the side of mac, I work from command line. But on the pc side I can't understand this.

    on a mac, this is

    deleteF="rm -r "+myNumPhoto.slice(0,39)+"imaging/*";
          app.system(deleteF);
    

    on the PC I'm trying to do the same thing with this.

    deleteF = "RD/s \\TEST\test".

    It runs the command, but I get the system cannot very well the specified file.

    If I run the slashes on the other hand, it works not at all of the suggestions would be greatly appreciated.

    much of the problem was with all the obliques. They must return the characters. That said I ended up doing a string. Here's what I used.

        myNumPhoto=app.document.presentationPath;
        s=myNumPhoto.slice(0,42)
        s.toString();
        s=s+"imaging";
          deleteF="RD /S /Q "+s;
          addF="MD "+s;
          app.system(deleteF);
          app.system(addF);
    

    I had to delete the folder, and then add it in back on the PC because the command RD except no wildcard characters.

  • Problem with the pen, lines and smoothing tool tool

    I draw the line 1.

    il line 1.jpg

    Then I pause (click the arrow and then click on the new tool pen) and draw of the line 2

    il line 2.jpg

    When I finished there is a surprising gap in line 1 after the intersection of line 2:

    il line 3 gap.jpg

    Then when I use the resulting mixture too the abstract looks at-non-contigue with dashed lines:

    il line 4.jpg

    instead of something of a continuous and uninterrupted wave lines like:

    blend.jpg

    For me, the problem is clearly the gap appear but I do not understand why it appeared, when as shown in image 2, I clearly I paint complete lines.

    Please check if the lines (at least one of them) with a filling.

  • OfficeJet 6600/problem with the vertical line that appears both scanned and copied items

    There is a vertical line that follows the entire length of a page when I scan or copy.  Have cleaned the glass, it is not the effect.  Help

    Hi gljatlaw,

    I see that you are having problems of quality of scan.  I'll take a look at the document below.

    Scan quality

    Let me know how it goes.

Maybe you are looking for