Delay inside of an array

Hi,
I"m creating my first game which is based on the efg framework ( www.8bitrocket.com/books/the-essential-guide-to-flash-games/ ). :slight_smile:

What I’d like to know if it’s possible to put a delay inside the processing of an array (in my case it’s some scores which appear temporarily when an enemy is destroyed).

The purpose of this question is: I’d like to make a delay so the scores appear half a second after the explosion. But this score array is driving me nuts. It would be very cool if anyone has an idea how to do that. Thanks in advance for ANY help.

Here’s some code (hope this helps):

public class ScoreManager 
{
	public var scoreBitmapData:BitmapData;
	
	public var scoreAnimationFrames:Array = [];
	
	public var scores:Array;
	public var tempScore:Score;		
	private var textfield:TextField = new TextField();
	private var $textWidth:int;
	private var $textHeight:int;
	
	private var rec:Rectangle;
			
	public var scoreCount:int;

	public var scoreCountTwo:int;
	public var scoreCountThree:int;
	
	private var drawingCanvas:Shape = new Shape();
	
	
	private var point0:Point = new Point(0, 0);
	
	private var tempBlitArrayAsset:BlitArrayAsset = new BlitArrayAsset();

	
	public function ScoreManager() 
	{
		
	}
	
	
	public function createScoreLook(textWidth:int, textHeight:int, text:String, textFormat:TextFormat):void {
		
		
		scoreBitmapData = new BitmapData(textWidth, textHeight, true, 0x00000000);
		
		
				
		textfield.defaultTextFormat = textFormat;
		textfield.selectable = false;
		textfield.text = text;

		
		trace("drawingCanvas.height =" + drawingCanvas.height);
		trace("drawingCanvas.width =" + drawingCanvas.width);
		
		scoreBitmapData.draw(textfield);
		tempBlitArrayAsset = new BlitArrayAsset();			
		
		$textWidth = textWidth;
		$textHeight = textHeight;
		
		
	}
	
	
	public function createScores(xPos:Number, yPos:Number, scoreLife:int = 40):void {
					
		
			
			var tempScore:Score = new Score(5, 1315, 5, 995);
								
			tempScore.bitmapData = scoreBitmapData;
			
						
			tempScore.x = xPos;
			tempScore.y = yPos;
			
			tempScore.life = scoreLife;
			tempScore.lifeCount = 0;
			
			tempScore.widthObject = $textWidth;
			tempScore.heightObject = $textHeight;
											
			
			tempScore.nextX = tempScore.x;
			tempScore.nextY = tempScore.y;
			
			
			
			scores.push(tempScore);
			}
					
	}
}