Green light and everything? Unless a crosswalk signal was going I don't think they'd have any business stopping you. How many cars were around you? Did you have a multi lane road or such? At least I think they shouldn't have nabbed you.
PS: even if a crosswalk signal was going I don't think they should be on your shit. Unless you had a car your adjacent lane attempting to hit and run a pedestrian trying to cut corners on your intersecting crosswalk which would give every police man in the county a reason to go after you.