Punishment, on its own, will not work.
Carrot + stick (punishment + incentive) might. But ... BUT my question: where are the parents in all this? When we see kids roaming in 'gangs', why is that? Why do they need/want the group as an alternative to being at home? What is stopping them being at home? (I.e drill down and you will see a clear connection to issues with the parents/guardians)
Building from the family up is the way to go, but surprisingly hard in today's world, it seems. Unlike Mista Vex over there, I cannot merely shout from the sidelines and blame it on a single group ;P (sorry S, but you know what I mean I think ^^) Family units, community breakdown, mobile workforce, work pressures, and so on and so forth.
Interesting correlation: kids chucking ball in middle of my road last night, I toot them on car horn to get out of the way, get stream of invective. In East End (London) where everyone knows everyone else, people have to be careful of such actions because a) you might well know their entire family b) you might well be a bigger villain who will bash them up, no probs! (and no, you can't cure society with 'slaps' and prison)