Articles Tagged 'SystemManager'

Movies resizable Flash: Act II

Returning to the Post StageExt Class: resizable Flash movies here is an even easier to get the same effect, only if the library for our movie is at least one Flash component!

Create a symbol, a red square 100 × 100 and place it in the stage calling resizeWindow. Enter the library, not on the Stage, any component, such as a TextInput, and enter the following code in the first frame of the movie.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
managers . SystemManager ; import mx. managers. SystemManager;
/ /
scaleMode = "noscale" Stage . scaleMode = "noScale"
/ /
/ / SystemManager.init ();
( "resize" , resizeWindow ) ; SystemManager. AddEventListener ("resize", resizeWindow);
/ /
= function ( Void ) : Void { resizeWindow. resize = function (Void): Void {
Object = SystemManager . screen ; var s: Object = SystemManager. screen;
_width = s . width ; this. _width = s. width;
_height = s . height ; this. _height = s. height;
_x = Math . round ( s . x ) ; this. _x = Math . round (s. x);
_y = Math . round ( s . y ) ; this. _y = Math . round (s. y);
}
( ) ; resizeWindow. resize ();

Line 6 (SystemManager.init () ;) can be omitted.

More ...


Stop SOPA