Flash Spellcheck - Using ASPSpellCheck with Flash

ASPSpellCheck has a full API to allow spellchecking within your SWF movies.

First, copy ASPSpellCheck to the root of your website.

You should also download the Flash API. This contains a file ASPSpellCheck.as which should be copied to the same directory as your Flash FLA development file.

 

1. Setup Your Flash Movie

#include "ASPSpellCheck.as"

_global.ASPSpellCheckURL = "/aspspellcheck/aspspellcheck.asp";

_global.ASPSpellCheckDictionary = "English (International)"



_global.ASPSpellCheckURL
Points to your ASPSpellCheck file. You may wish to make this an absolute URL when testing from within the flash environment.

_global.ASPSpellCheckDictionary
This optional property can be set to choose your dictionary. It is analogous to the ASPSpellLink.dictionary property.

You can also use the settings file to customize the spell checker in detail.

 

 

2. The spellCheck Function

The function spellCheck (word, callback ) makes an asynchronous server call for spellchecking.

spelldone = function(success){
trace ("Spellcheck Result "+ success)
}

spellCheck("Any word.",spelldone)

callback points to a callback function which handles the result of the spellcheck. It is passed a boolean result of either true or false.

 


3. The spellSuggest Function

The function spellSuggest (word, callback ) makes an asynchronous server that returns spelling suggestions for a word.

suggestdone = function(suggestions){
trace ("Spelling Suggestions : " + suggestions)
}

spellSuggest("helllo",suggestdone)

callback points to a callback function which handles the returned suggestions. It is passed an array of strings.

 

 

< More Demonstrations of ASP Spell Checking Applications