7 Replies Latest reply on Oct 26, 2010 6:36 AM by Ned Murphy

    Cursor visible in Text Area

    A.kameshwaran Level 1

      Hi,

           I would like to know how to hav the cursor visible in non editable Text Area. Thanks in advance.

       

      Regads,

      Kameshwaran A

        • 1. Re: Cursor visible in Text Area
          srirama.83

          Create a cursor movieclip and move it as the text changes.

           

          Hope this will be useful

          http://www.actionscript.org/forums/showthread.php3?t=126465

          • 2. Re: Cursor visible in Text Area
            A.kameshwaran Level 1

            Hi

               Thanks for the reply. But my problem is, I am using textarea and it is in fixed size. Because, i will be loading the minimum of 150 lines at a instance. creating a movieclip and having it will not resolve my problem. Please tell me some other way.

            • 3. Re: Cursor visible in Text Area
              Ned Murphy Adobe Community Professional & MVP

              What is the problem you are having? Does the cursor disappear when you move over the textarea, or does it change to something you do not want it to appear as or something else?

              • 4. Re: Cursor visible in Text Area
                A.kameshwaran Level 1

                Hi Ned,

                 

                 

                     I have a two part in my stage. one is Image area and the other is TextArea with properties Editable = false.

                TextArea wil have the text which is extracted from the image (ex: Magzine).

                Once user click the text coressponding line in the image will be highlighted. So user can come to know which line they are.

                 

                Problem,

                  If user clicks the textarea, cursor point should be viewable.But it is not viewable.

                 

                This is the problem. Please help me in this issue.

                 

                Note:

                If i keep the textarea properties as editable = true i can have the cursor point. but i should not have like this.

                 

                Regards,

                Kameshwaran A

                • 5. Re: Cursor visible in Text Area
                  Ned Murphy Adobe Community Professional & MVP

                  Can you show a screenshot displaying the cursor as you want to see it over the textarea?

                  • 6. Re: Cursor visible in Text Area
                    A.kameshwaran Level 1

                    Hi Murphy,

                         Please find the screenshot. I need to have the normal textarea cursor to be visible when it is set be editable = false.

                    cursor.JPG

                    • 7. Re: Cursor visible in Text Area
                      Ned Murphy Adobe Community Professional & MVP

                      That is the normal cursor for an editablke textarea, not a textarea that cannot be edited.  I do not know of any way you can get it to appear without having an editable textarea.  But now that it is clearer what you want, if someone else knows a way to do this, then maybe they will see this and try to help.

                       

                      There is one way you could implement it as an editable textfield.  You just rewrite the text each time a change is attempted, such as in the following example (ta is a textarea on the stage)...

                       

                      var theText = "some text for the textarea";

                       

                      function writeText(){
                      ta.text = theText;
                      }

                       

                      writeText(); // write the text intitially

                       

                      // create a listener for a change event for the textarea

                      var taListener:Object = new Object();
                      taListener.change = function(eventObject:Object) {
                          writeText(); // rewrite the text into the textfield
                      };
                      ta.addEventListener("change", taListener);

                       

                       

                      The attempt to change the text should not be visually detectable.

                      1 person found this helpful