Components Flex



    xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="initApp()">
    
         
        import flashx.textLayout.conversion.TextConverter; 
        import flashx.textLayout.elements.Configuration; 
        import flashx.textLayout.elements.IConfiguration; 
        import flashx.textLayout.formats.ITextLayoutFormat; 
        import flashx.textLayout.formats.TextDecoration; 
        import flashx.textLayout.formats.TextLayoutFormat; 
        private function initApp():void { 
            var txt:String = "adobe.com."; 
            var cfg:Configuration = new Configuration(true); 
            var normalFmt:TextLayoutFormat = new TextLayoutFormat(cfg.defaultLinkNormalFormat); 
            normalFmt.color = 0xFF0000; // red 
            normalFmt.textDecoration = TextDecoration.NONE; 
            var hoverFmt:TextLayoutFormat = new TextLayoutFormat(cfg.defaultLinkHoverFormat); 
            hoverFmt.color = 0xFF00FF; // purple 
            hoverFmt.textDecoration = TextDecoration.UNDERLINE; 
            cfg.defaultLinkNormalFormat = normalFmt; 
            cfg.defaultLinkHoverFormat = hoverFmt; 
            rt.textFlow = TextConverter.importToFlow(txt, 
            TextConverter.TEXT_FIELD_HTML_FORMAT, cfg); 
        }