Geocasting is a variant of multicasting and a popular mechanism used in vehicular ad hoc networks. To reduce the risk of car accidents and avoid traffic congestions, many application systems in VANETs are designed to transmit traffic messages in a specific geographical area by geocasting. In this paper, a dynamic geocasting algorithm is proposed to notify the vehicles on the road that the ambulance will approach to yield the way and the traffic lights are set to green for the convenience of ambulances to pass.