Flash 8 actionscript

Hello,

First I want to say I have been coming here for a long time. Sitepoint rocks. I figured I would try my luck here first.

I built a simple drag and drop city building game. All of my buildings are simple movie objects or graphic objects. Using simple start drag and stop drag. What code must I add in order to have these buildings snap to a single line at the bottom of the page. Imagine that H is a building and t is a tree or accessory. How do I make that H and T snap to that simple and single bottom line.

HHH HHtt HHttttHHH HHHH


I have been trying to make this work forever but I keep getting actionscript errors and I know its because im dumb. Someone please help me. I am using Flash 8.

yourDraggableMovieClip.onRelease = function() {
  this.stopDrag();
  this._y = yourBottomLineClip._y;
};