import flash.events.Event;
private var currentTextColor:Object;
private function myCreationComplete(eventObj:Event):void {
currentTextColor = getStyle('color');
}
private function handleInvalidVal(eventObject:Event):void {
setStyle('color', "red");
}
private function handleValidVal(eventObject:Event):void {
setStyle('color', currentTextColor);
}
initialize="myCreationComplete(event);"
invalid="handleInvalidVal(event);" valid="handleValidVal(event);" />