Components Flex



    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="initApp()">
    
        
    

    
         
        import mx.core.IUITextField; 
        import flashx.textLayout.elements.TextRange; 
        private function initApp():void { 
          sparkRET.selectRange(0, 10); 
        } 
        private function getTextSelection():void { 
             var anchorPos:int = sparkRET.selectionAnchorPosition; 
             var activePos:int = sparkRET.selectionActivePosition; 
             myLabel.text = "Current Selection: \"" + sparkRET.text.substring(anchorPos,activePos) + "\""; 
        } 
      
    

            selectionHighlighting="TextSelectionHighlighting.ALWAYS"
        selectable="true" text="Spark RichEditableText control." />