PDA

View Full Version : Rolling domino effect - some help needed


divarch
12-10-2003, 07:25 AM
Hi guys, I haven't posted a while, been busy cooking with J. Lott:)

I am making 6X3 field of 18 total clips.
So far code looks like this:
this.mask_mc.onEnterFrame = function() {
this.mask_mc._visible = false;
//first row of clips
for (var i = 0; i<6; i++) {
duplicateMovieClip("_root.mask_mc", "newMask"+i, i*5);
_root["newMask"+i]._x = 125+i*50;
}
//second row
for (var i = 6; i>=6 & i<12; i++) {
duplicateMovieClip("_root.mask_mc", "newMask"+i, i*5);
_root["newMask"+i]._x = i*50-175;
_root["newMask"+i]._y = 150;
}
//third row
for (var i = 12; i>=12 & i<18; i++) {
duplicateMovieClip("_root.mask_mc", "newMask"+i, i*5);
_root["newMask"+i]._x = i*50-475;
_root["newMask"+i]._y = 200;
}
delete this.mask_mc.onEnterFrame;
};


And, although code could use some polish, everything works, the clips are in position

But, I am having trouble when I insert even the tiny animation in the original clip's timeline.
Some basic tween to shrink a bit....
Animation only works for the first clip.
I have tried calling it from the _root, and from clip's timeline also, but no go.

Please, any suggestions appreciated.
Maybe I should use attachMovie instead?
Thanks.