what cause an hyandi accent to die on you on 1998 Hyundai Accent

when i crank it up it doesnt crank on first crank and when you drive it. when you stop at red light it wants to die on me.

it sounds like a possible vacuum leak. have a shop check it for you and verify the failure.