Scaling in flash
Scaling in flash
Out of context: Reply #3
- Started
- Last post
- 12 Responses
- unfittoprint0
in the html, make your swf width and height equal 100%.
In your flash movie use the following code [in an action layer]:
// top, center position
Stage.align = "T";
// Prevent scaling
Stage.scaleMode = "noScale";// Create the listener object
resizeListener = new Object();
resizeListener.onResize = function () {
contentMC._x = (Stage.width - contentMC)/2;
backgroundMC._x = (Stage.width - backgroundMC)/2;
trace("New width: " + Stage.width);
};Stage.addListener(resizeListener...