6 Replies Latest reply: Sep 16, 2013 12:47 PM by digibrink RSS

    TLF text direction.

    atar11

      Hello there!!


      When I create a TLF text area that is editable at runtime (which means that it can get a user input at runtime) I set the text direction to the 'right-to-left' definition in both the 'container and flow' and the 'paragraph' sections and set the language for Arabic or Hebrew at the 'locale' setting. I also set the text alignment to the 'align to start' mode.
      Now at runtime there's a stange thing. When I try to click with the mouse cursor on the editable TLF text-box, it's not displaying the text icon cursor and don't allow me to insert text inside. But when I move my mouse cursor over the right side of the editable TLF text box, it change his appearance to the familiar text cursor which indicate that if you click here you will be able to insert text input inside.
      So my problem is how can I make it that only when I will hover over the TLF text box itself, the mouse cursor will be changed to text cursor icon and when I will hover beside its right side, it will remain at the normal cursor mode.

       

      Thanks in advance!!

       

      Atar.
        • 1. Re: TLF text direction.
          yon876

          having the same problem!!!! help!!!

           

          more details:

           

          the bug happens even if the direction stay in left to right.

          just set the align to right and you will see the problem!!

           

          hrere code:

           

          var myTLFTextField:TLFTextField = new TLFTextField();

           

          addChild(myTLFTextField);

          myTLFTextField.x = 10;

          myTLFTextField.y = 10;

          myTLFTextField.width = 200

          myTLFTextField.height = 120;

          myTLFTextField.multiline = true;

          myTLFTextField.wordWrap = true;

          myTLFTextField.border = true;

          myTLFTextField.borderColor = 0xff0000;

           

          var myFormat:TextLayoutFormat = new TextLayoutFormat();

          myFormat.textIndent = 2;

          myFormat.color = 0x336633;

          myFormat.fontFamily = "Arial";

          myFormat.fontSize = 13;

          myFormat.textAlign = TextAlign.RIGHT;

           

          var myTextFlow:TextFlow = myTLFTextField.textFlow;

          myTextFlow.hostFormat = myFormat;

          myTextFlow.flowComposer.updateAllControllers();

           

           

          now i found a "bandage" solution:

          if the fontSize set to 13 and the height of the field to 16 it work perfect

          and if the height of the field close to fontSize it work

           

          but i wont a multiline textfield with something like 120px height with small font size.

           

          please help.

          • 2. Re: TLF text direction.
            nimasoroosh

            if u only puplish your fla file in flash cs5 this problem will be fixed (but i cant find any thing to correct this bug in flash cs5.5 or cs6 )

            • 3. Re: TLF text direction.
              akram85s

              Hello mate,

              i'm facing the same problem, tried many suggested solutions asked many flash developers, but unfortunately nothing worked

              have you figured out the isuue and have a reliable solution?

              that would be highly appreciated

              thanks in advance

              • 4. Re: TLF text direction.
                Alex Ghiu

                I've had this same problem. My fix is posted over here: https://github.com/alexdeefuse/TLFTextField-fix

                I tested it only on single line TLFTextFields.

                If you take a look at the fix, what I'm doing is go down the display list of the TLFTextField and correct the position of the SimpleButton inside there. (the button is responsible for the user input and TLF's extend DisplayObjectContainers).

                Hope it helps!

                Regards, Alex Ghiu

                • 5. Re: TLF text direction.
                  akram85s Community Member

                  Thank you so much,

                  that was absolutely helping

                  much appreciated

                  btw i have solved it in another way (moving alignment rulers manually)

                  which worked good for single-line text

                  and here is how i fixed it (my stupid way)

                  align.JPG

                  Regards,

                  Akram Alsmadi

                  • 6. Re: TLF text direction.
                    digibrink

                    Has this been solved by Adobe yet? This is incredibly frustrating.

                     

                    I have TLF text that is being named using AS, but since the nav has different line lengths, they don't stay right aligned and end up all over the place. It seems to me this is just a bug in Adobe's coding, but I don't understand why it hasn't been fixed after so much time.

                     

                    Do I have to completely redesign my FLA just to accomodate for this error?