private function boldVerb(_phrase:String, _verb:String):String
{
var newHtmlText:String = "";
var format:TextFormat = new TextFormat();
format.color = 0x990000;
var pattern:RegExp = new RegExp([_verb]);
newHtmlText = _phrase.replace(pattern, "<b>" + _verb + "</b>");
textField.setTextFormat(format);
return newHtmlText;
}
If textField is a text field on the stage this should work, but this is how you do text formatting in AS3, do a google search on "AS3 TextFormat" for more info. First, create a new TextFormat object, and give it a property, I chose a dark red #990000 (0x990000 in AS) and then applied it to the text field. I am sure you're wanting to format the string itself, which I don't recall if that's possible in Flash, but you can certainly edit the text field itself. So you may have to string together some text fields to get a string of text with one accented word. hopefully that gets you a step closer! Good luck!