# Resizing Stage3D Dynamically?

**URL:** <https://forum.kirupa.com/t/resizing-stage3d-dynamically/325309>\
**Category:** flash\
**Created:** [October 8, 2011, 11:33pm UTC](https://forum.kirupa.com/t/resizing-stage3d-dynamically/325309 "2011-10-08T23:33:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![reppinfreedom](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@reppinfreedom](https://forum.kirupa.com/u/reppinfreedom)\
**Post date:** [October 8, 2011, 11:33pm UTC](https://forum.kirupa.com/t/resizing-stage3d-dynamically/325309/1 "2011-10-08T23:33:06Z")

</div>

Is there a way to change the size of the 3D stage with the flash window size dynamically? When using Starling going into fullscreen I can’t seem to get the 3d content to either zoom or have the stage increase in side. 3D content is only visible in the original area set by the movie size.

Maybe I need to re-initialize all of the 3d classes and set them to the screen size when the user switches from window to fullscreen?

Edit: Got that working, now how do I stop the content from zooming…

```auto
    stage.addEventListener(ResizeEvent.RESIZE, resizeStage);
        
        private function resizeStage(e:Event) {
            var viewPortRectangle:Rectangle = new Rectangle();
            viewPortRectangle.width = stage.stageWidth;
            viewPortRectangle.height = stage.stageHeight;
            Starling.current.viewPort = viewPortRectangle;
            
            stage.stageWidth = stage.stageWidth;
            stage.stageHeight = stage.stageHeight;
        }

```
