Question

I'm a bit newbie to Flash, and I'm experiencing strange problem.

I have a simple flash application, which when run in Flash player looks like this

enter image description here

the thing is, when i resize the Flash player window, a black frame becomes visible to the left and top of the stage. enter image description here

Now, is it possible that these black areas start appearing on the right side, and the stage to be fixed on the left? The strange thing is that these black areas are not part of the stage, the (0,0) coordinate is there where white area starts and not in the corner of the window, and that's causing me problems.

Was it helpful?

Solution

Add this in your main class to align the stage in the top left corner:

addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);

private function onAddedToStage(e:Event):void 
{
    removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
    stage.align = StageAlign.TOP_LEFT;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top