Trying to replace a timeline loop with a setInterval. For some reason, the function I am using to duplicate my movieclips is not working from setInterval but does work from a normal function call. Why would this be??? I know the functions is actually being called because I traced it. But the duplication of the ball does not. I guess this is scoping but where do I go from here?
birthBall = function(){
ball.duplicateMovieClip("ball"+_parent.counter, _parent.counter);
this["ball"+_parent.counter].colNumber = random(4);
this["ball"+_parent.counter]._x = _parent.column[this["ball"+_parent.counter].colNumber];
this["ball"+_parent.counter]._y = 100;
this["ball"+_parent.counter].onEnterFrame = function() {
this._y -= _root.speed;
if (this._y<=-250) {
_parent["b"+this.colNumber].gotoAndPlay(2);
delete this.onEnterFrame;
}
}
_parent.counter++;
};
myID = setInterval(birthBall, 1000); // does not duplicate the clips but birthBall(); does.