Here’s a very simple AS3 project consisting of one class which draws a rectangle. When I run it, the rectangle is clearly larger than 100×100 pixels. After pulling out my hair for a few hours I thought I’d ask: why?
Edit: I know that it isn’t correct because, though I have my screen resolution set to 1280×800, if I set the width to 500 it takes up almost all of my screen.
package
{
import flash.display.Sprite;
import flash.events.Event;
public class Draw extends Sprite
{
private var screen:Sprite;
public function Draw():void
{
this.addEventListener(Event.ADDED_TO_STAGE, stageHandler);
}
private function stageHandler(e:Event):void{
screen = new Sprite();
screen.graphics.clear();
screen.graphics.beginFill(0x333333,.9);
screen.graphics.drawRect(0,0,100, 100);
screen.graphics.endFill();
addChild(screen);
trace(stage.width + "," + stage.height);
}
}
}
:

Somehow your scalemode settigns for your flash player are set in a strange mode from FlashBuilder.
Try setting
in your stageHandler function. You code has no errors. The problem is in your publish preview settings somewhere.