Overlapping objects - help

Hi,

can someone help me with the following problem please:

In my game there appear scores when you shoot down enemies. That kinda works so far but they overlap when the enemies were too close to each other when shot down.
Now what I’d like to do is to prevent the overlapping of the scores. The basic idea I had was to loop through the array of scores and to check the distance to each other.
Problem is that it doesn’t work. Can someone help please?


private function checkScoreDistance():void
{
	scoreManager.scoreCount = scoreManager.scores.length;
	if (scoreManager.scoreCount >= 1)
	{
		scoreManager.scoreCount = scoreManager.scores.length - 1;
		scoreManager.scoreCountTwo = scoreManager.scores.length - 2;
			
		scoreOne: for (var scoreCtr:int = scoreManager.scoreCount; scoreCtr >= 0; scoreCtr--)
		{
		
			tempScore = scoreManager.scores[scoreCtr];
			tempScore.point.x = tempScore.x;
			tempScore.point.y = tempScore.y;
			oldtempScoreX = tempScore.x;
			oldtempScoreY = tempScore.y;
				
			var tempScoreTwo:Score;
			scoreTwo: for (var scoreCtrTwo:int = scoreManager.scoreCountTwo; scoreCtrTwo >= 0; scoreCtrTwo--)
			{
				tempScoreTwo = scoreManager.scores[scoreCtrTwo];
				tempScoreTwo.point.x = tempScoreTwo.x;
				tempScoreTwo.point.y = tempScoreTwo.y;
						
				oldtempScoreTwoX = tempScoreTwo.x;
				oldtempScoreTwoY = tempScoreTwo.y; 
						
				var scoresX:Number; 
				scoresX = oldtempScoreTwoX - oldtempScoreX;
						
				var scoresY:Number;
				scoresY = oldtempScoreTwoY - oldtempScoreY;
						
				var dist:Number;
						
				dist = Math.sqrt(scoresX * scoresX + scoresY * scoresY);
												
				if (dist <= 25)
				{
					oldtempScoreX -= 25;
					oldtempScoreTwoX += 25;
							
					oldtempScoreY -= 25;
					oldtempScoreTwoY += 25;
					}
						
				}
			
			}
		}
	}
}