<?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="initApp();"
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function initApp():void
{
var htmlString:String = "<a
href='http://www.mikebritton.com'>Visit this site to split hairs!</a>";
post_ta.htmlText = makePrettyLinks( htmlString );
}
private function makePrettyLinks(str:String):String
{
var pattern1:RegExp = /<a/gi;
var pattern2:RegExp = /a>/gi;
var firstPass:String = str.replace(pattern1,
"<b><u><a");
var secondPass:String = firstPass.replace(pattern2,
"a></u></b>");
return secondPass;
}
]]>
</mx:Script>
<mx:TextArea id="post_ta" backgroundColor="#FFFFDF" width="100%"
height="100%" editable="false" />
</mx:Application>
Hopefully this formats correctly! Email me at [EMAIL PROTECTED] if
it doesn't and you're still stuck.
Mike Britton
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/