Not sure if I’m missing sth or is it just a bug.
I have a movieclip on stage, it’s a simple rectangle drawn with a rect tool (no stroke)
I add an event listener to trace out the mouseX, works OK so far.
When I increase its width the mouseX traces wrong values.
Here’s a sample code:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, stageResize);
function stageResize(e:Event):void
{
rect.width = stage.stageWidth - 50;
}
rect.addEventListener(MouseEvent.CLICK, rectClick);
function rectClick(e:MouseEvent):void
{
trace(rect.mouseX);
trace(rect.width);
}
So when the stage is resized, rect.mouseX gives me the values like the rect was never resized.