Resize window with actionscript 3.0

13,333

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

Share:
13,333

Related videos on Youtube

pypmannetjies
Author by

pypmannetjies

Software Engineer obsessed with quality and best practices

Updated on June 04, 2022

Comments

  • pypmannetjies
    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
    pypmannetjies about 15 years
    No, it only resizes the stage and not the objects on the stage.
  • pypmannetjies
    pypmannetjies about 15 years
    Ahh... 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.

Related