You’re probably looking for this:
http://forum.mikrotik.com/t/advanced-routing-failover-without-scripting/136599/1