How to use Squiggly “Check spell” with RichEditableText in Flex

Technorati Tags:

make sure that

1- The file AdobeSpellingUITLF.swc  in lib folder

2-the file SpellingConfig.xml  in the floder  /assets/dict/ in source folder

3- the two files en_US.aff , en_US.dic in folder /assets/dict/en_US/ as shown in file SpellingConfig.xml 

 

<?xml version="1.0" encoding="utf-8"?>
<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" 
			   creationComplete="creationCompleteHandler(event)">
	<fx:Script>
		<![CDATA[
			import com.adobe.linguistics.spelling.SpellUIForTLF;
			
			import mx.events.FlexEvent;			
		
			
			protected function englishButton_clickHandler():void
			{				
				SpellUIForTLF.disableSpelling(myTextArea.textFlow);
				SpellUIForTLF.enableSpelling(myTextArea.textFlow,"en_US");	
			}
		
			protected function creationCompleteHandler(event:FlexEvent):void
			{
				SpellUIForTLF.spellingConfigUrl = "assets/dict/SpellingConfig.xml";				
			}
			
		]]>
	</fx:Script>
	<s:RichEditableText id="myTextArea" bottom="50"  top="0" left="0" right="200 />
	<s:HGroup  height="50" bottom="0">
		<s:Button label="en_US" 
				  click="englishButton_clickHandler()" />

	</s:HGroup>
</s:Application>

SpellingConfig.xml 

<?xml version="1.0" encoding='UTF-8'?>
<SpellingConfig>
  <LanguageResource language="English" languageCode="en_US" ruleFile="assets/dict/en_US/en_US.aff" dictionaryFile="assets/dict/en_US/en_US.dic"/>
</SpellingConfig>
Posted in flex | Tagged , | Leave a comment

hoow to draw Rectangle in flashBuilder

 

 

<?xml version=”1.0″ encoding=”utf-8″?>
<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” minWidth=”955″ minHeight=”600″>
    <fx:Declarations>
        <!– Place non-visual elements (e.g., services, value objects) here –>
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            import mx.core.UIComponent;
            import flash.display.*;
            protected function togglebutton1_clickHandler(event:MouseEvent):void
            {
                var rect:UIComponent=new UIComponent();
                rect.graphics.lineStyle(1);
                rect.graphics.beginFill(0x0000FF,1);
                rect.graphics.drawRect(100,100,350,350);
                rect.graphics.endFill();
                myCanvas.addChild(rect);
            }           
        ]]>
    </fx:Script>
    <s:ToggleButton  x=”21″ y=”10″     click=”togglebutton1_clickHandler(event)”/>
    <mx:Canvas width=”100%” height=”100%” id=”myCanvas”></mx:Canvas>
</s:Application>

Posted in flex | Tagged , | Leave a comment

How to insert image in flashbuilder

make sure that the image file in your source folder

 

 

<?xml version="1.0" encoding="utf-8"?>
<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" minWidth="955" minHeight="600">
	<fx:Declarations>
		<!-- Place non-visual elements (e.g., services, value objects) here -->
	</fx:Declarations>
	
	
	<fx:Script>
		<![CDATA[
		
			import spark.components.Image; 
			protected function togglebutton1_clickHandler(event:MouseEvent):void
			{
			
				var ilg:Image = new Image();
				ilg.source ="ala.jpg" ;
							
				ilg.x=100
				ilg.y=100
				myCanvas.addChild(ilg); 
			}            
			
		]]>
	</fx:Script>
	
	
	<s:ToggleButton  x="21" y="10"     click="togglebutton1_clickHandler(event)"/>
	<mx:Canvas width="100%" height="100%" id="myCanvas"></mx:Canvas>

</s:Application>
Posted in Uncategorized | Leave a comment

Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Posted in Uncategorized | 1 Comment