clean up example
diff --git a/TourDeFlex/TourDeFlex3/src/apache/squiggly/SpellingExExample.mxml b/TourDeFlex/TourDeFlex3/src/apache/squiggly/SpellingExExample.mxml
index d6aea3a..547b45c 100644
--- a/TourDeFlex/TourDeFlex3/src/apache/squiggly/SpellingExExample.mxml
+++ b/TourDeFlex/TourDeFlex3/src/apache/squiggly/SpellingExExample.mxml
@@ -17,11 +17,16 @@
limitations under the License.
-->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark">
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
- import com.adobe.linguistics.spelling.SpellUI;
+ import com.adobe.linguistics.spelling.SpellUI;
+
+ private function enableSpelling():void {
+ SpellUI.enableSpelling(textArea, "en_US");
+ }
]]>
</fx:Script>
@@ -30,10 +35,10 @@
<s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
</s:layout>
<s:Group width="100%" height="100%">
- <s:TextArea id="ta_en" width="50%" height="50%"
- text="I know Enlish. Use the context menu to see the suggestions of the missbelled word."
- creationComplete="SpellUI.enableSpelling(ta_en, 'en_US')"/>
+ <s:TextArea id="textArea" width="50%" height="50%"
+ text="I know Enlish. Use the context menu to see the suggestions of the missbelled word." />
</s:Group>
+ <s:Button label="Check Spelling" click="enableSpelling()" />
</s:Panel>
</s:Application>