Resize window with actionscript 3.0
Yes stageWidth and stageHeight are readonly, despite the docs. But if the SWF is embedded in a web page, then changing its element width and height will change the stage size and scaleMode will determine how that is handled. All the SWFs at my Enjoy3D web site do this on window resize...
Related videos on Youtube
pypmannetjies
Software Engineer obsessed with quality and best practices
Updated on June 04, 2022Comments
-
pypmannetjies almost 2 years
Is there any way to resize an entire Flash project using Actionscript or some other method?
I have created a 1024x768 Flash CS3 application, but upon closer inspection of the specifications, I now realise it has to be 800x600. Instead of manually making everything smaller, I'd like to resize the window as if someone were dragging the outside edge. Or perhaps add a button that allows switching between 1024x768 and 800x600. Is this possible?
I mean something like this:
stage.stageWidth = 800; stage.stageHeight = 600;
-
pypmannetjies about 15 yearsNo, it only resizes the stage and not the objects on the stage.
-
pypmannetjies about 15 yearsAhh... but it is not in a website. But it's ok, I've found that you can make everything on the stage into a new movieclip, resize that and then just break the movieclip apart again.