i am trying yo set dynamic Mask my whole code is below
var id:Number;
var n:Number = 10;
var a:Number = 0;
var thumbsize = 105;

var Box:MovieClip = new ContentBox();
Box.x = a * thumbsize + 10;
Box.y = 250;

while(a < n)
	var thumb_holder:MovieClip = new ImageBox();
	thumb_holder.y = 250;
	thumb_holder.id = a;
	thumb_holder.x = a * thumbsize + 10;
	thumb_holder.mask = Box;
	a = a + 1;
now i am trying to dynamically add the boxes that i made and linkage and all those boxes are being added through while loop. i also created a box for holding content which will be a mask for those small boxes are added through while loop. now i want to add a setMask so that boxes are masked inside content box.

i am using the line "thumb_holder.mask = Box" but it is not giving me the desired result.
so how can i do this?