Flex.org - The Directory for Flex
My Amazon.com Wish List

Flex Spell Checker Component

Posted by Hilary Bridel on August 7th, 2006

Everyone needs a spell checker — right?

Well here it is. A Flex 2 spellchecker component using the (unofficial) google spell checker service API.

Flex 2 Features used in the component
The Flex SpellCheckComponent extends the mx.controls.PopUpButton control. You can use it with a TextInput, TextArea or RichTextEditor control.

The component can be instantiated with MXML or Actionscript, and will use the Google service URL directly if a proxy url is not defined in urlString. (The default Google url will only work from within Flex Builder).

It uses a Menu control as the button popup, which is used to select the language that the spellcheck should use.

When you click on an incorrectly spelt word, it uses a List control to display the list of possible corrections returned from the Google spellcheck service.

A custom skin is used for the information tab that attaches itself to the text area being tested, and the Fade effect to fade the information tab into view.

Public variables use the Inspectable Metadata tag, which expose them as attribute hints in the hints and tag inspector area of Flex Builder.

The component implements the powerful XML-handling standards defined in ECMAScript for XML (E4X) specification. This is used to Search, add and delete nodes and attributes directly on the returned XML string from the Google service.

You can download the component from here. The zip file contains a SWC, documentation and a sample file. I am going to enter this in the Adobe and Builder AU Flex Developer Derby Contest, but I will probably release the component once the contest is finished. I don’t expect to win anything with this cause it’s not “sexy” enough for a Flex entry. It does however use LOTS of Flex features, and was very quick to develop — I just love this Flex stuff!

Let me know of any problems or issues you find so I can make it useful for the community.

View the Flex Spell Checker Demo
Download the Flex Spell Checker Component


Parse error: parse error, unexpected $end in D:\hshome\bridelor\bridel.org\blog\wp-content\themes\wp-andreas09\comments.php on line 273