Basically, flat is used in British English (and English speaking countries with strong links to the UK) and apartment is used in American English. I think apartment is becoming used more often in the UK now though... certainly everyone in the UK would understand 'apartment' while I think many people in the USA would be confused by the use of 'flat'.
'Residential complex' would just be a group of flats or apartment buildings together. It is easily understood but it is not a common phrase in the UK.