Alec Baldwin has to "stay out of trouble," according to a New York City judge. The actor was arrested in May after he was spotted bicycling against the flow of traffic along Manhattan's Fifth Avenue.

Baldwin was also hit with a disorderly conduct charge for getting angry at officers who asked for his ID.

On Thursday morning the former "30 Rock" star appeared in court and said he'd rather pay a fine than apologize to the two female officers who confronted him during the incident.

Judge John Delury decided instead on an adjournment in contemplation of dismissal. If Baldwin remains on his best behavior for the next six months, the incident will be removed from his record.
During the brief hearing, the judge asked Baldwin, "Can you stay out of trouble, Alexander?" to which the actor replied, "Sure, sure," prompting Delury to say, "Be a good boy from now on. Have a good day."

Baldwin is currently developing a TV project for NBC featuring himself as the Mayor of New York City. His character will be based on Toronto mayor Rob Ford, who has made headlines for cocaine and alcohol abuse.

He is also working on several films, including "Still Alice" and "Mission: Impossible 5."