Array elements and setMask() ? hekp please

Hi,
I have duplicated a few bars and placed them on a MC (an image), trying to define each of these bars as a mask of the same MC. But it seems that only the last element of the array works as a mask. Can we define 10 bars to be a mask of the same MC?
[AS]
var bars = new Array();
var n = 10;
var num=0;
gridx = bar._width;

for(i=0;i<n;i++){
_root.bar.duplicateMovieClip(“bar”+num,num);
mc = this[“bar”+num];
mc.lag = num;
mc._x=gridx*i;
mc._y=-320;
bars[num] = mc;
pic.setMask(bars[num]);
num++;
}
[/AS]

any help on this, please?
mx-guest2004

Put all your bars into a mc and use that to mask.

You know, I want to make these bars comming down after each other with a time lag.
mx-guest2004

you still can
http://www.kirupaforum.com/forums/showthread.php?t=65011

Does the image become masked with this effect? I mean when the different bars come down at different times, does the different parts of the image appear under the mask?
You know, I don’t have my .fla file here right now, therefore have to ask these questions.
mx-guest2004

Yes they do, have you had a look at the files in the other post?

Ok I get it now. Thanks stringy :slight_smile:
mx-guest2004

welcome