setChildIndex doesnt work for me


var container_mc:MovieClip = new MovieClip();
addChild(container_mc);
 
var mc1:MovieClip = new Picture();
;
container_mc.addChild(mc1);
mc1.x = 0;

var mc2:MovieClip = new Picture();
container_mc.addChild(mc2);
mc2.x = 100;
 
var mc3:MovieClip = new Picture();
container_mc.addChild(mc3);
mc3.x = 200;

mc1.addEventListener(MouseEvent.CLICK, onTop);
mc2.addEventListener(MouseEvent.CLICK, onTop);
mc3.addEventListener(MouseEvent.CLICK, onTop);
function onTop(event:MouseEvent):void{
 container_mc.setChildIndex(event.target, 2);
}
 

im trying to read the book : Learning ActionScript 3.0 - a beginner’s guide from Rich Shupe with Zevan Rosser, O’REILLY published, and im only on chapter 4, but
alot of codes examples arnt working and always giving me erriors.
what am i doing wrong?

the code above gives me “implicit coercion of a value with static type Object to a possibly unrelated type flash.display:DisplayObject.container_mc.setChildIndex(event.target, 2);”