Random position without overlapping
Posted
by Hwang
on Stack Overflow
See other posts from Stack Overflow
or by Hwang
Published on 2010-03-23T04:48:28Z
Indexed on
2010/03/23
4:51 UTC
Read the original article
Hit count: 398
How to stop MCs from overlapping each other?
private function loadWishes():void {
for (i; i
} } private function checkOverlap(wishB:MovieClip) { wishB.x=Math.random()*stage.stageWidth; wishB.y=Math.random()*stage.stageHeight; for (var i:uint=0; i
This doesn't seems to be working cause the amount of it checking whether MC is overlapping is about the amount of MC on stage. how to make it keep checking till everything's fine?
© Stack Overflow or respective owner