I have a weird problem. I create a movieclip, and place it in another movieclip, which is placed on stage. In the first MC I have a button, and when I push this button the movieclips height suddenly changes!?
I don’t have any code that will change the height, and I don’t add or remove anyting that will effect the height.
function addProduct(e:MouseEvent):void {
var cartProduct_mc:MovieClip = new MovieClip();
.........
.........
var del_btn:Button = new Button();
del_btn.label = "Delete";
del_btn.addEventListener(MouseEvent.CLICK, preDeleteProduct);
cartProduct_mc.addChild(del_btn);
cart_mc.addChild(cartProduct_mc);
trace(cartProduct_mc.height); // This returns 185
}
function preDeleteProduct(e:MouseEvent):void {
var this_mc:MovieClip = e.target.parent;
trace(this_mc.height); // This returns 107????
........
........
}