You are Here:Home>>Old Posts>>Component | FlexSpellCheck with source code

Component | FlexSpellCheck with source code

Carlos Pinho
By | 2008-04-02T19:26:35+00:00 Apr 2, 2008|Old Posts|

FlexSpellCheck Component Source Code

Today i’ve find this nice flex component using the google spell checker service API.

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!

View the Flex Spell Checker Demo

FlexSpellCheck Component source code.
Some documentation can be found in the original post download here

About the Author:

Carlos Pinho
A father, a husband and a geek... Carlos was the founder of projects like The Tech Labs and Flash Enabled Blog. He is the founder of TekTuts He is passionate about technologies. Their main skills are in analytics, transport & logistics, business administration. He also writes about programming resources, trends, strategy and web development.