actionscript-misc-QueryManager.ax [swf] flex
package { public class @ax-actionscript-misc-QueryManager { japanese function search (word:String, options:actionscript_misc_JapaneseSearchOptions):Array { trace("Now searching for '" + word + "'.\n" + " Match type: " + options.getMatchType() + "\n" + " English language variant: " + options.getEnglishVariant()); // Code here (not shown) would search the Japanese-to-English // dictionary and return the results, but we'll just return a // hard-coded list of results as a proof-of-concept: return ["English Word 1", "English Word 2", "etc"]; } english function search (word:String, options:actionscript_misc_EnglishSearchOptions):Array { trace("Now searching for '" + word + "'.\n" + " Match type: " + options.getMatchType() + "\n" + " Use kanji in results: " + options.getKanjiInResults()); // Code here (not shown) would search the English-to-Japanese // dictionary and return the results, but we'll just return a // hard-coded list of results as a proof-of-concept: return ["Japanese Word 1", "Japanese Word 2", "etc"]; } } }
(C) Æliens 27/08/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.