# I want to use this animation but stage should be of same browser size?

**URL:** <https://forum.kirupa.com/t/i-want-to-use-this-animation-but-stage-should-be-of-same-browser-size/330079>\
**Category:** flash\
**Created:** [November 26, 2012, 7:58pm UTC](https://forum.kirupa.com/t/i-want-to-use-this-animation-but-stage-should-be-of-same-browser-size/330079 "2012-11-26T19:58:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learner\_7n](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@learner\_7n](https://forum.kirupa.com/u/learner_7n)\
**Post date:** [November 26, 2012, 7:58pm UTC](https://forum.kirupa.com/t/i-want-to-use-this-animation-but-stage-should-be-of-same-browser-size/330079/1 "2012-11-26T19:58:25Z")

</div>

Hi,

How can I use this animating clouds on my flash movie? When I am keeping the stage size same as browser size by auto resizing, my flash movie get shrink and expand continuously.

[http://www.amarasoftware.com/flash-animations/clouds-animation.html](http://www.amarasoftware.com/flash-animations/clouds-animation.html)  
The following is the code I used to resize the stage width & height to fit the browser window.

```auto
var myStage:Stage=this.stage;
myStage.scaleMode=StageScaleMode.NO_SCALE;
myStage.align=StageAlign.TOP_LEFT;

function initialDisplay(event:Event):void{
    var swfWidth:int=myStage.stageWidth;
    var swfHeight:int=myStage.stageHeight;
    
    MainContainer.width=swfWidth;
    MainContainer.height=swfHeight;
}

addEventListener(Event.ENTER_FRAME,initialDisplay);

```

Any help please.

PS: When the clouds move out of the flash stage, the browser window starts shrink & expand unexpectedly.
