Hi Im using a for in loop to grab the names of my mc on the _root timeline and push() them into an array named bricks. i then use a prototype function fade them in one at a time. The problem is that it only works to a piont and then stops.
I thought posible causes could be the time it takes to build the array as i do have 713 mc on my timeline.
this is my code i tried attaching the fla but its to big
fadespeed = 9;
function init(){
brick = new Array();
for(var prop in _root){
if(typeof _root[prop] ==“movieclip”){
brick.push(_root[prop]);
}
for( var i = 0; i<brick.length; i++) {
brick*._alpha = 0;
brick*.id = i;
}
brick[0].fade();
}
}
MovieClip.prototype.fade = function() {
this.go = true;
this.onEnterFrame = function() {
this._alpha += fadespeed;
if (this.go) {
if (this._alpha<50) {
this.go = false;
brick[this.id+1].fade();
}
}
if (this._alpha>=100) {
delete this.onEnterFrame;
}
};
};
init();
thank you