AIR – Change the size of Stage at runtime dynamically

Yesterday I came across a fact that you can resize the stage size dynamically at runtime using actionscript code. But this is limited to AIR only (either Flash or Flex) but not supported in normal Flash.

Following is the code to change the width and height of the stage at anytime (runtime) using actionscript in AIR (Flash) ::

stage.stageWidth = {numericValue};

stage.stageHeight = {numericValue};

Of course, we can change the width and height of the stage in Flash (normal) using JavaScript or some other external script which controls the container of the swf file.

Naresh Khokhaneshiya

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.