You can add a custom error to any element or object by using the id of the object followed by .errorString
private function startinsert(evt:Event):void
{
if (txtFirstName.text != "" && txtLastName.text != "")
{
mycfc.insertrecord(txtFirstName.text,txtLastName.text); // All statements inside { } are guarded by IF.
txtFirstName.errorString = '';
txtLastName.errorString = '';
}
else
{
Alert.show("check to make sure you have entered both the first AND the last name");
txtFirstName.errorString = "First Name Cannot be Left Blank";
txtLastName.errorString = "Last Name Cannot be Left Blank";
}
}