-
-
Senior Member
You can BitmapData.draw() any of the DisplayObjects you're using to construct the shape into a BitmapData, and then still use the floodFill() method to see if there are any leeks. Seems like the simplest solution...
Otherwise you'd need to work on line detection or something...I'm not sure, I'd have to think about it for a while.
WIP-ZOMBIES
I love vegetarians! More meat for the rest of us!
-
Originally Posted by DespeRat
for example if I build a square of beer cans(display objects), and one can is missing - how could I discover, by actionscript means, that my 'beer can castle' is not complete?
You would track this information in an array. Update the array when a beer can has been added or removed.
-
You can determine the proximity of each beer can from each other, by measuring the distance between the centers of each can, see if it exceeds the gap space you've set.
-
I've come to this:
on square grid -
For each can --> check sides, if there's a 'neighbor', group them. When more than 4 cans are grouped - fill spaces between them. Or when more than 8 cans like this
ooo
o o
ooo
we fill the center square
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|