How to size component in layer
I have a button and I want to add transparency layer to it, now as you can may see(I wrapped the area with a red rectangle) that transparency layer is added only to a portion of the button. I want it to span over the whole button
to summerize:
my goal is
1- I want both the image and the button to have the same size //Done
2- I want when the button is pressed or hovered, to have a (opacity/transparent layer/shade) over it to give it some tint // Done
3- I want the shade/tint to cover the whole button


This is the code related to this issue, this is how I set the button Width and height inside of the button class
public function SetWidthAndHeight(newWidth: Number, newHeight: Number): void
{
width = newWidth;
height = newHeight;
ImageContainer.height = newHeight;
ImageContainer.width = newWidth;
}the problem is The size of the button increase but the shape of the square remain untouched
This is how I add the childs on the main layer,
var g_newButton = new MyButton();
g_newButton.ImageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, OnCompleteHandler);;
g_newButton.SetWidthAndHeight(200,200);
g_newButton.LoadTestImage();
function OnCompleteHandler(loadEvent: Event)
{
//Add the Loaded Image to the Image container Layer
g_newButton.ImageContainer.addChild(loadEvent.currentTarget.content);
//Add the Button to the canvas
addChild(g_newButton);
}What I am doing wrong?
Thanks in advance
