TLF result is different from Flex in the AIR

Hello

I want to create colorful container TLF that seem to be as follows.

colorfulTLF.jpg

-1 character is 1 container

-Display 1 character in turn

-Use linked containers

-SDK: Flex4.1 (build 16076) + AIR2.0

<?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"
            creationComplete="init()"
            minWidth="800" minHeight="600">
   <s:layout>
      <s:HorizontalLayout/>
   </s:layout>
   
   <fx:Script>
      <![CDATA[
         import flashx.textLayout.container.ContainerController;
         import flashx.textLayout.conversion.TextConverter;
         import flashx.textLayout.elements.FlowElement;
         import flashx.textLayout.elements.ParagraphElement;
         import flashx.textLayout.elements.SpanElement;
         import flashx.textLayout.elements.TextFlow;
         
         import spark.core.SpriteVisualElement;
         
         private function init():void
         {
            var sample:String = "<?xml version='1.0' encoding='utf-8'?>" +
               "<flow:TextFlow whiteSpaceCollapse='preserve'" +
               " xmlns:flow='http://ns.adobe.com/textLayout/2008'>" +
               "<flow:p><flow:span>ABCDEF</flow:span></flow:p></flow:TextFlow>";            
            
            var textFlow:TextFlow = TextConverter.importToFlow(sample,TextConverter.TEXT_LAYOUT_FORMAT);
            textFlow.fontSize = 50;
            
            //  Timer to display 1 character in turn
            var len:int = textFlow.getText().length;
            var displayTimer:Timer = new Timer(100,len);
            displayTimer.addEventListener(TimerEvent.TIMER,onDisplayTimer);
            displayTimer.start();
            
            function onDisplayTimer(event:TimerEvent):void
            {
               var container:SpriteVisualElement = containerBG(50,50,textFlow.blockProgression);
               container.width = 50;
               container.height = 50;
               addElement(container);
               
               var controller:ContainerController = new ContainerController(container, 50, 50);
               textFlow.flowComposer.addController(controller);
               
               // update contoroller
               var index:int = textFlow.flowComposer.getControllerIndex(controller);
               textFlow.flowComposer.updateToController(index);
            }
         }
         
         // container background color is random.
         private function containerBG(w:Number,h:Number,bp:String):SpriteVisualElement
         {
            var boxBG:SpriteVisualElement = new SpriteVisualElement();
            
            var g:Graphics = boxBG.graphics;
            
            var color:uint = Math.random() * 0xFFFFFF;
            
            g.lineStyle(0.5,color);
            g.beginFill(color,1);
            g.drawRect(0, 0, w, h);
            g.endFill();
            
            return boxBG;
         }
         
      ]]>
   </fx:Script>
</s:Application>

 

In a Flex application, work out as planned.

But in application of AIR, character sheets, which appear to be as follows.

colorfulTLF_air.jpg

Why would the results be different?

Thank you.

I can reproduce this problem. I did not understand why what happens exactly, but I have excluded any slight differences between the player and air regarding measures of fonts. Jumping between related containers comes with text that corresponds without ambiguity in-tank 2 has text in it, and add a unique container 3 character makes the text jump over and jump the tank 2.

Thanks for the report - I'll log a bug.

Tags: Adobe Open Source

Similar Questions

  • How do you take a deposit which is different from that of the monthly payments?

    I have a client who is in British Colombia and moved to Infusionsoft.

    At that time there BC might not take a deposit which was different from that of the monthly payments.

    Whenever they would have to manually set up the payments. They do not want to manually set up the payments.

    Is it possible to automatically install these progress payments in British Colombia now?

    Hi Tim

    Support to this recurrent stage of payments (with a different cycle types - daily, monthly, annual, etc.) but not progressive payments BC.

    Silviu

  • the result is different from the version textLayout.swc.

    Hello

    I wrote simple code using TLF.
    It generated three text box with different textAlign.
    But the result of that code is different from the version textLayout.swc.

    Why is the result different?

    I tried textLayout.swc comes with...
    [A] flex 4 SDK_4.0.0.7219
    [B] flex 4 SDK_4.0.0.9437

    OS: WinXP SP2
    SDK: worm 3.4
    Tool: Flex Builder 3

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
          creationComplete="init()">
         <mx:Script>
              <![CDATA[
                   import flashx.textLayout.formats.TextLayoutFormat;
                   import flashx.textLayout.container.ContainerController;
                   import flashx.textLayout.elements.SpanElement;
                   import flashx.textLayout.elements.ParagraphElement;
                   import flashx.textLayout.elements.TextFlow;
                   import flashx.textLayout.elements.Configuration;
                   
                   private function init():void
                   {
                        var textBox1:Sprite = createTextBox("left");
                        textBox1.x = 300;
                        textBox1.y = 100;
                        this.rawChildren.addChild(textBox1);
                        
                        var textBox2:Sprite = createTextBox("center");
                        textBox2.x = 300;
                        textBox2.y = 250;
                        this.rawChildren.addChild(textBox2);
                        
                        var textBox3:Sprite = createTextBox("right");
                        textBox3.x = 300;
                        textBox3.y = 400;
                        this.rawChildren.addChild(textBox3);
                   }
                   
                   private function createTextBox(value:String):Sprite
                   {
                        var rect:Rectangle = new Rectangle(0,0,300,100);
                        
                        var sprite:Sprite = new Sprite();
                         sprite.graphics.lineStyle (1, 0x000000, 1.0);
                        sprite.graphics.beginFill (0xFF0000, 1.0);
                        sprite.graphics.drawRect  (rect.x, rect.y , rect.width , rect.height);
                        
                        var tlFormat:TextLayoutFormat = new TextLayoutFormat();
                        tlFormat.textAlign = value;
                        tlFormat.color = 0x000000;
                        tlFormat.fontSize = 50;
                        
                        var config:Configuration = new Configuration();
                        config.textFlowInitialFormat = tlFormat;
                        
                        var textFlow:TextFlow = new TextFlow(config);
                        
                        var p:ParagraphElement = new ParagraphElement();
                        var s:SpanElement = new SpanElement();
                        s.text = value;
                        p.addChild(s);
                        textFlow.addChild(p);
                        
                        textFlow.flowComposer.addController(new ContainerController(sprite, rect.width,rect.height));
                        
                        textFlow.flowComposer.updateAllControllers();
                        
                        return sprite;
                   }
                   
              ]]>
         </mx:Script>
    </mx:Application>
    

    [A] textLayout.swc comes with SDK_4.0.0.7219

    [B] textLayout.swc comes with SDK_4.0.0.9437

    4007219.jpg4009437.jpg

    Yes.  There was a regression introduced - its since been corrected.  Trace example [B] ContainerController.horizontalScrollPosition - I think you will see that it is different from zero.

    Richard

  • The executable font size different from that in the enrironment of LabVIEW Development

    I created an executable of LabVIEW, but the size of the font used in the executable file is different from the original font used in the labVIEW development environment. How to solve this problem?

    Thank you.

    Ian


  • Print a specific to Ubuntu Web page is different from printing to the same printer in Windows.

    A specific Web page that I need to print regular print well in firefox under Windows XP, but the areas of text wrap differently in firefox on Ubuntu. It is only visible in the preview page print - in normal Web page it shows correctly.

    You can automate using the Greasemonkey extension and a userscript.

    After installing Greasemonkey, a monkey icon should appear in the bar of the add-on. When you are on the page that you want to change, click on the little drop-down menu and choose new user script change the URL so that it will match all your checks and add an asterisk (*) at the end (this option is also available in the Tools menu; ALT + t to see if necessary.)

    You can choose any text editor as your code editor. Then add above the line of code below the block of metadata automatically inserted. It should be applied automatically when you reload the page.

    A little luck?

  • SPR in OBIEE is different from that of the administration tool

    I have edited the RPD (new.rpd) and deploy it to the server. When I opened OBIEE, I got the new area of topic, but when I change online the RPD in the administration tool, the RPD was the old one (SampleAppLite), so I can't edit online the RPD. Can I know how to change online the new RPD? I want to change online the new RPD. Why has this happened? Thanks master

    Dear Sir

    I think you're wrong to choose the port. try to watch your em, then go in Business Intelligence - coreapplication - availability - process tab. I guess you are using 11g, but if you use 10g. simply stick to the word of availability, you can find this in Capacity Management tab. Then look at the BI server, check the host and port. Start making your DSN from that. I hope it helps

    Satya

  • My first is little different from that of the tutorial samples

    When I import a video clip picture only 1 appears on the tape. In the tutorial there are many clips and you can pass the ICT for which you want to change. There are a few things which show on the tutorial that I don't have on my screen. Should I uninstall and reinsatll it. I have not only the numbers to put in a dvd. This is the training program I have.

    elizabethd

    Thanks for the follow-up.

    Expert opinion.

    When you click the icon to the left of the word video film, you get 4 choices of the display style.

    They are

    black horizontal line, no thumbnails

    all thumbnails

    thumbnails but only at the beginning and end of the clip

    only a label at the beginning of the clip.

    Even where the video clip is represented on the timeline in thumbnails across the entire clip, you see not all frames in the clip until to enrich the content of the timeline to maximum with the - + cursor above the timeline.

    Looks like you're the 3rd above selected choice. If you want to cut some of the clip, move the timeline indicator and watch the monitor of editing area.

    When you see the first place that you want to cut, click the scissors of the stem of the timeline indicator or use the shortcut Ctrl + K. You made a cut in the video instead which is the view in the editing area monitor.

    You can watch in the video trimming in its preview window, which is accessible by double-clicking on the thumbnail of the file in the active Expert of the project space.

    Adobe Premiere Elements help. Trimming clips

    Also

    https://helpx.Adobe.com/PDF/premiere-elements_reference.PDF

    https://helpx.Adobe.com/PDF/elements-organizer_reference.PDF

    Adobe Premiere Elements help. Adobe Premiere Elements help

    Please check and examine, explore, and experiment. If the highest of the clarification of needs, do not hesitate to ask.

    Do one step at a time.

    RTA

  • InDesign CS6: Is it possible to create a pdf file in which the version for printing is different from that on the screen?

    Hello

    Everything is in the title!

    The idea is to make a pdf that I send to the customers by e-mail, very graphic with colored backgrounds, but when you print, the background becomes white to save the ink. Similarly for changing the color of the text.

    For example, on the screen when I open a pdf file, I see white text on a blue background, but the impression we see black text on white background.

    Thank you

    Convert the background of a button and set it to appear on the screen, but unprintable.

  • adrci see home - different from that of the home of the oracle of the sid

    I am trying to figure to configure adrci to cleaning tracefiles.

    However I am confused which show adrci returned did not match the initial setting of: diagnostic_dest.

    Here is the example:

    adrci

    ADRCI: Version 11.1.0.7.0 - Production on Tue Aug 9 13:45:08 2011

    Copyright (c) 1982, 2007, Oracle. All rights reserved.

    Basis of the ADR = "/ opt/oracle.
    adrci > view home
    Houses of ADR:
    diag, rdbms, wdbm, wdbm
    diag/clients/user_oracle/host_wdbm
    diag, tnslsnr, wdbm, listener_wdbm1
    diag, tnslsnr, wdbm, listener_wdbm_local
    adrci > output


    ---------------------

    SQL > show the diagnostic parameter

    VALUE OF TYPE NAME
    ------------------------------------ ----------- ------------------------------
    diagnostic_dest string/opt/oracle/admin/WDBM/diag

    Before I was running adrci, I install the. oraenv on behalf of sid and oracle home is oriented the right way.

    I'm off clue what is happening here and how do I configure adrci to point to the diagnostic_dest?

    Thank you

    Please read the documentation: http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/adrci.htm#BGBCAABI says:

    >
    If several houses are underway, it means homepath points to a directory in the ADR tree that contains several directories below ADR. To focus on a single House of ADR, you must set the homepath to the low point in the hierarchy of directories, a single home directory of ADR.
    >

    Edited by: P. Forstmann August 10, 2011 19:56

  • Installation of the version of language different from the CC &amp; B

    Hi all

    have any body tried to install CC & B in one language different from other English

    The standard installation file we get from the edelvery includes the different language versions too?

    Can anyone advice on how exactly to go with a facility to a different language version. I'll try to find a method to install the french version of CC & B2.3

    The standard installation file we get from the edelvery includes the different language versions too?

    No, you must download the language pack separately from Metalink. The language packs are specific to the CC & B versions.

    Can anyone advice on how exactly to go with a facility to a different language version. I'll try to find a method to install the french version of CC & B2. 3

    Follow Note: 973812.1 on Metalink, there answer to all your questions.
    Basically, the pre-requisites are that you install the database with characterset appropriate and run NEWLANG batch to duplicate already existing language entries, usually in English

    for example, the French language on CC & B v2.2 you would apply patch 7498832.

  • Disappear from files on the remote server (was: local files and remote server)

    Hi, a few days ago my remote server is different from my files the. When I put the files, the first files seem to be placed on the remote server and then a large part of them disappear (after a few minutes)

    Although this file seems to have disappear from the remote FTP list, it resides in the folder root of your server

    http://www.nathaliecallenaere.com/30.formations_informations_infographie_avignonet.html

  • Updated Windows - you can do a typical upgrade using an installation disc that's different from the language...

    Hello, I'm Michael.

    I'm a guy who lives in Hong Kong, I bought a laptop that comes with Chinese traditional x 64 Windows 7 Home Preium. I want to use this laptop as a computer professional. Because I don't want to use Chinese as my default language in my computer, so I'm going to upgrade my computer I have subscribed the TechNet, so I downloaded an iso file from the Microsoft TechNet Web site. I downloaded an English x 64 to windows 7 Ultimate. I hope it would work, but an error message is skipped during the upgrade. It is said: you can do an upgrade using an installation disc that's different from the language installed on your computer. Go online to see how to install Windows 7 and keep your files and settings.
    I tried to press the hyperlink (go online) and it does not at all. I have to ask this question to the Microsoft Answers and see if if anyone can give come me advice because I do not want to click on the custom button because there are some files saved in my computer. So I need answers as soon as possible because I could die without a PC! Thanks for all those who read this and you time.

    No direct path to the evolution of the Chinese language to English. But you can upgrade your version of Home Premium to Windows 7 Ultimate (upgrade Express). Ultimate has support for English and a number of other languages.

    Amazon: http://www.amazon.com/Microsoft-Windows-Anytime-Upgrade-Ultimate/dp/B002JZ1QWA/ref=sr_1_3?s=software&ie=UTF8&qid=1362231885&sr=1-3&keywords=Microsoft+Windows+7+Anytime+Upgrade

    =================================================

    If you have a retail version of Windows 7, then use the "Anytime Upgrade":
    When you use the "Anytime Upgrade" option, all what you need to do is enter the product Windows 7 upgrade key has been purchased. Do this by clicking on: start/search and enter: upgrade Express

    Upward to a more powerful edition
    http://www.Microsoft.com/Windows/Windows-7/get/anytime-upgrade/Home-Premium.aspx

    Upgrade to another edition of Windows 7 by using Windows Anytime Upgrade
    http://Windows.Microsoft.com/en-us/Windows7/upgrade-to-another-edition-of-Windows-7-by-using-Windows-Anytime-Upgrade

    A 'step by step' to go through an upgrade to a lower edition of Windows 7 to a higher edition of Windows 7:
    http://windowsteamblog.com/blogs/Windows7/pages/the-Windows-Anytime-Upgrade-experience-for-Windows-7.aspx

    Paths to upgrade Windows 7 (supported upgrade scenarios)
    http://TechNet.Microsoft.com/en-us/library/dd772579%28WS.10%29.aspx

    Windows Anytime Upgrade is supported only in the following countries:
    Australia, Belgium, Canada, France, Germany, Italy, Japan, Netherlands,
    Spain, Sweden, Switzerland, United Kingdom and United States

    Windows 7 Starter to Professional upgrade Express
    http://www.Microsoft.com/Windows/buy/Windows-7-upgrade-Starter-to-professional.aspx

    Most likely the best option and the most popular will be the Home Premium upgrade to Windows 7 Professional, which includes Windows XP Mode. The extra $50.00 for Windows 7 Ultimate will only give you two additional features, bitlocker (for security) and the ability to switch between any of 35 languages.

    Windows 7 - Anytime Upgrade - frequently asked Questions:
    http://Windows.Microsoft.com/en-us/Windows7/Windows-Anytime-Upgrade-frequently-asked-questions

    Windows 7 - upgrade Express features:
    http://Windows.Microsoft.com/en-us/Windows7/products/features/Windows-Anytime-Upgrade

    Windows 7 - version comparisons:
    http://Windows.Microsoft.com/en-us/Windows7/products/compare-editions

    MS Windows 7 store price:
    http://www.microsoftstore.com/Store?defaultKeyword=Search&siteid=msstore&action=list&CategoryID=38336300&Keywords=Anytime+Upgrade&result=

    Note: Retail 'Full' or 'Upgrade' product keys will work when you use the Express Upgrade feature.
    The Express Upgrade "may" not always work for users who have system integrators and or OEM product keys, this applies also to VL (Volume License), MSDNAA or key teaching will not work with the Express upgrade. KMS users consult your administrator before attempting to perform an Express upgrade.

    J W Stuart: http://www.pagestart.com

  • The query results reel in a file and the number of lines in a different file

    Hello

    I would like to export only the result of my query to a file. I am able to do this with several sql, but I want the number of selected lines in a different file than the output "log".

    For example:

    -------------------------------------
    Select 'TEST' for the DOUBLE;

    TEST

    + 1 row selected. +

    -------------------------------------

    So 'TEST' should be included in the results file and ' 1 selected line"to a different log file.

    Is it possible to achieve this sql * more.

    Thank you for your time

    Rodriguez,

    Hi, Rodriguez,

    Welcome to the forum!

    Here's one way:

    COLUMN     row_cnt_col  NOPRINT     NEW_VALUE row_cnt
    
    --  You may or may not want the following settings.
    --  The 2-file output works with or without them.
    SET     FEEDBACK     OFF
    SET     VERIFY          OFF
    
    SPOOL     dept.txt
    
    SELECT     deptno, dname
    ,     COUNT (*) OVER ()     AS row_cnt_col
    FROM     scott.dept
    ;
    
    SPOOL     OFF
    
    SPOOL     dept.log
    
    SELECT     &row_cnt     AS total_rows_found
    FROM     dual;
    
    SPOOL     OFF
    

    The first SPOOL file, dept.txt, looks like this:

    `   DEPTNO DNAME
    ---------- --------------
            10 ACCOUNTING
            20 RESEARCH
            30 SALES
            40 OPERATIONS
    

    The second SPOOL file, dept.log, looks like this:

    TOTAL_ROWS_FOUND
    ----------------
                   4
    

    Taking your example, only the first query should change:

    SELECT     'TEST'               AS output
    ,     COUNT (*) OVER ()     AS row_cnt_col
    FROM     dual
    ;
    

    The second query and all the stuff set up is exactly the same.

    Published by: Frank Kulash, 27 September 2012 09:38

  • Popup LOV result differs from Lily LOV

    Hello
    I wanted to spend a popup LOV lists using the same named LOV, but the display changes. I wanted the field to display a name, even if the underlying value is an id number and it works very well with a simple list of LOV. When I change the pop-up list, the name no longer displays in the field, only a number. Whey is the Popup behaves differently from the list? Am I missing something? I even did in Apex 4.0.1 and earlier at the Apex 4.1 and got the same result.

    Pat

    Try to use the ' Popup * key * LOV...» "vs type 'Popup LOV."... ».

  • What is displayed in the layers palette is different from what is on the canvas - Illustrator CS6

    I'm not a super user in Illustrator, but I know my way around it and understand more than the basics.  I downloaded this Shutterstock vector but what I see on the layers palette is different from what is on the Web and if I try to save or export to another thing, the result is looking like the palette layers - almost black.

    And it only happens on some of the objects, as you can see on the image, the Apple and other leaves are very well.  It also does pumpkin and some of the grapes in the fall.  Any idea what's going on?  I checked all my layers to see if something looked weird, but they all look good...

    When I opened the original Shutterstock .eps file in Photoshop, I get the same black objects.

    screenshot.jpgscreenshot2.jpg

    View > preview overprinting (enable this)

    Does look dark now, then:

    Windows > attributes

    Select the item that is acting strange

    Uncheck the overprint fill

Maybe you are looking for