# How to perform the "Snap to Grid" effect?

**URL:** <https://forum.kirupa.com/t/how-to-perform-the-snap-to-grid-effect/312607>\
**Category:** flash\
**Created:** [August 8, 2010, 11:31pm UTC](https://forum.kirupa.com/t/how-to-perform-the-snap-to-grid-effect/312607 "2010-08-08T23:31:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![euniceee](https://avatars.discourse-cdn.com/v4/letter/e/71c47a/32.png) [@euniceee](https://forum.kirupa.com/u/euniceee)\
**Post date:** [August 8, 2010, 11:31pm UTC](https://forum.kirupa.com/t/how-to-perform-the-snap-to-grid-effect/312607/1 "2010-08-08T23:31:14Z")

</div>

Hi, I am currently building a chinese puzzle game called tangram. I am wondering is there any method that I could do to make the movie clips to perform the “snap to grid” effect? i.e. the tangram puzzles being snapped to the pattern. I have tried to draw my own and used the “cacheAsBitmap” function to implement it, however it doesn’t seems to be working. I have just written the code for building the grid, but what should I do next to make the snapping action? Is there any suggestions or tutorials to this problem? Thank you very much.
