I also wanted a machine that dispensed the candy when the handle was pushed in, instead of when pulled out. Another design feature I wanted was an area to collect the candy from after being dispensed. I'm very pleased with how it came out and already have a few ideas for my next Lego candy machine.
I recently entered this in the 2013 Alameda County Fair and it ended up winning a 1st place ribbon :D !
Step 1: The Mechanism
I decided to have a base of 8x8 studs since that size lends itself well to building with 2x4 and 1x2 bricks .
I used the green 1x2 tiles to build the base of where the mechanism will live.
I added a combination of tiles and plates to the top so the lid would be easy release. I made the lid by putting tiles on top of a 4x6 plate.