Flash 4 scripting part 2 - using get property and set property
simple snap to grid sample

 

the sample: