Targeting dynamically attached clips

Hi guys,

I want to target ALL the 20 clips attached as below, at the same time, when I press the button “blue”.
However, my code can target only ONE of the clips at any time. I have tried attaching the clips to a separate dynamic clip and then targeting it but problems with the registration point (0,0) of that clip means I cannot achieve the result I want:


for(i=0;i<20;i++){
 mc = this.attachMovie("red","red2"+i,i);
 var scaleFactor:Number = Math.random() * 80 + 20;
 mc._x = Math.random()*500;
 mc._y = Math.random()*400;
 mc._xscale = scaleFactor;
 mc._yscale = scaleFactor;
 
blue.onRelease = function(){
  new Tween(mc,"_xscale",Strong.easeOut,mc._xscale,200,3,true);
  new Tween(mc,"_yscale",Strong.easeOut,mc._yscale,200,3,true);
          }
}

Thanks for any help. :slight_smile: