If you search for 'bubble shooter' you'll find quite a few threads dealing with this type of game mechanic. One or 2 may even have an example .capx that may point you in the right direction or give you a few pointers, but I wouldn't consider this an easy game mechanic to fully grasp.