2 Replies Latest reply on Sep 13, 2007 1:05 PM by kglad

    Applying StyleSheet for Input text... spell checker

    Level 7
      I have the need to add a spell checker to a Flash application I am
      developing.

      The user can enter text into an input TextField. Once done they click
      "Spell Check" and using a LoadVars object I send the data to a page that
      processes the text and returns any likely misspelled words. Then I am
      using a prototype function of the String class to do a search and
      replace on all instances of the likely misspelled words adding a <span
      class="error"> </span> around the misspellings.

      What I have found, however, is that once a stylesheet is applied to the
      TextField it is no longer an input field and instead changes to a
      dynamic field, where I can not change the text to make corrections,
      changes, etc.

      Is there any way to do this?

      Thanks.
      SB
        • 1. Re: Applying StyleSheet for Input text... spell checker
          Level 7
          sberry wrote:
          > I have the need to add a spell checker to a Flash application I am
          > developing.
          >
          > The user can enter text into an input TextField. Once done they click
          > "Spell Check" and using a LoadVars object I send the data to a page that
          > processes the text and returns any likely misspelled words. Then I am
          > using a prototype function of the String class to do a search and
          > replace on all instances of the likely misspelled words adding a <span
          > class="error"> </span> around the misspellings.
          >
          > What I have found, however, is that once a stylesheet is applied to the
          > TextField it is no longer an input field and instead changes to a
          > dynamic field, where I can not change the text to make corrections,
          > changes, etc.
          >
          > Is there any way to do this?
          >
          > Thanks.
          > SB


          I found this link...
          http://board.flashkit.com/board/archive/index.php/t-503729.html

          Does anyone know of a way to remove a stylesheet after it has been applied?

          • 2. Re: Applying StyleSheet for Input text... spell checker
            kglad Adobe Community Professional & MVP
            assign the styleSheet property of your textfield to null.

            p.s. you should be able to an onSetFocus method to change your textfield to an input textfield after removing the stylesheet.