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
the thing is, when i resize the Flash player window, a black frame becomes visible to the left and top of the stage.
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) coordina开发者_如何学JAVAte is there where white area starts and not in the corner of the window, and that's causing me problems.
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;
}
精彩评论