Common applications:
Import flash. display. stagealign;
Import flash. display. stagescalemode;
Stage. align = stagealign. top_left;
Stage. scalemode = "noscale ";
Stage. addeventlistener (event. Resize, resizehandler );
Function resizehandler (Event: Event ){
BJ. width = stage. stagewidth;
BJ. Height = stage. stageheight;
}
GS application:
Import flash. display. stagealign;
Import flash. display. stagescalemode;
Import com. greensock. layout .*;
// No scaling + upper left alignment
Stage. scalemode = stagescalemode. no_scale;
Stage. align = stagealign. top_left;
// Adaptive stage Element
VaR area: autofitarea = new autofitarea (this, 0, 0, stage. stagewidth, stage. stageheight, 0xff0000 );
Area. Attach (PP1, scalemode. proportional_outside, alignmode. Center, alignmode. center );
Area. Preview = true;
// Align stage Elements
VaR ls: liquidstage = new liquidstage (this. Stage, 800,555,800,555 );
Ls. Attach (PP2, ls. right_center );
Ls. Attach (PP3, ls. left_center );