Hi.
I have a blog post that has this mechanic although set up for arrays -
HERE
.
Also this post by
Salt
will help you understand the concept behind bitwise numbers for tiling.
I also made some really heavy changes to you capx to show you how it can be done in your example. Using this method though might cause problems when there are lot's of tiles on screen. Either changing to the array method or only checking tiles near to the newly added tile would help. But It'll give you a starting point.
[attachment=0:q007viac][/attachment:q007viac]