Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize window with actionscript 3.0

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;
like image 777
pypmannetjies Avatar asked Mar 08 '09 21:03

pypmannetjies


1 Answers

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...

like image 95
Scott Evernden Avatar answered Oct 03 '22 20:10

Scott Evernden