I only have CS3
so I couldnt open your file..
but you want to do something like this? (every couple seconds add a new circle to the stage.. but stop after 10 circles are added to the stage?
these circle all need to be interactive as well? click on them they need to do something?
try this:
make a movieClip...in your LIBRARY.. needs to have the LINKAGE NAME OF circle_mc
then just use this code:
Actionscript Code:
var totalCircles:Number = 10;
var circleCounter:Number = 0;
var timeDelay:Number = 100;
var timerID = setInterval(createCircles, timeDelay);
function createCircles() {
trace("fired");
var newCircle = _root.attachMovie("circle_mc", "circle_"+circleCounter, _root.getNextHighestDepth());
trace("NEW: "+newCircle);
//place randomly on stage
newCircle._x = random(Stage.width);
newCircle._y = random(Stage.height);
//add interactive code
newCircle.onPress = function(){
this.startDrag();
trace("Name: "+this);
}
newCircle.onRelease = function(){
stopDrag();
}
//update counter var
circleCounter++;
trace("Counter: "+circleCounter);
//check to see if last circle added
if(circleCounter == totalCircles){
clearInterval(timerID);
}
}