on Sep 27th, 2008Actionscript 3 stage origin.
Hi there, it’s been a while.
So, what’s about AS3 stage origin? Well, I tried to use the stage with this.stage.scaleMode = flash.display.StageScaleMode.NO_SCALE; associated with this.stage.stageWidth; and this.stage.stageHeight; to work with a non-scaled, just-in-time dimensioned stage; but I had a nasty problem: when I used this.stage.stageWidth; and this.stage.stageHeight; to get the stage dimentions, and set them to my objects (movieclips, sprites, layouts, etc.), with X = 0 and Y = 0 coordinates; they were stuck at some given coordinates, but not in the top left of the browser viewport.
Actually, the 800×600 stage was centered. It’s quite simple, you just have to set this.stage.align = flash.display.StageAlign.TOP + flash.display.StageAlign.LEFT; but if you don’t know that; you could waste a lot of time wondering why the stage origin is not in the top left.



Thanks for this, I’d been wondering how to do it