NEW YORK (AP) -- A judge has told actor Shia LaBeouf that a disorderly conduct case against him will be dismissed and sealed if he avoids being arrested in the next six months.

Actor Shia LaBeouf, center, is escorted by court officers as he leaves Manhattan Criminal court, Friday, March 20, 2015, in New York. (AP Photo/Mary Altaffer)

A prosecutor told Manhattan Criminal Court Judge Ann Scherzer on Friday the "Transformers" star has completed a treatment program following a June arrest at a Broadway show.

Authorities charged LaBeouf with a violation after he smoked cigarettes, yelled at actors on stage and cursed at security guards while watching a "Cabaret" revival.

Representatives for the 28-year-old actor have said he's been treated for an alcohol problem.

LaBeouf said nothing to reporters as he climbed into a black SUV following his brief court appearance. Wearing a dark suit, he sported an eyebrow piercing and a braided rat tail hair style.

 

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)