# Swf 100%

**URL:** <https://forum.kirupa.com/t/swf-100/293315>\
**Category:** Uncategorized\
**Created:** [July 27, 2009, 11:19am UTC](https://forum.kirupa.com/t/swf-100/293315 "2009-07-27T11:19:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacknumpty](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jacknumpty](https://forum.kirupa.com/u/jacknumpty)\
**Post date:** [July 27, 2009, 11:19am UTC](https://forum.kirupa.com/t/swf-100/293315/1 "2009-07-27T11:19:09Z")

</div>

I have a flex swf that has the dimensions for the width and height set to 100%.

When you expand the flex application in a browser window the flex swf expands so that you can see more products.

I am loading this flex swf into a flash swf. I want the flex swf to expand with the page. I have tried using this technique in Flash to get the flex swf to expand (see below, i changed the names to work on my flex swf) it expands the container that i am loading the flex swf into but it does not expand the flex swf. Plus i am not trying to expand the scale i just want the flex swf to be able to show more products if there is room:

[COLOR=RoyalBlue]import flash.display.Stage;  
import flash.display.StageAlign;  
import flash.display.StageScaleMode;  
import flash.events.Event;

var swfStage:Stage = videoScreen.stage;  
swfStage.scaleMode = StageScaleMode.NO\_SCALE;  
swfStage.align = StageAlign.TOP\_LEFT;

function resizeDisplay(event:Event):void  
{  
var swfWidth:int = swfStage.stageWidth;  
var swfHeight:int = swfStage.stageHeight;

```
// Resize the video window.
var newVideoHeight:Number = swfHeight - controlBar.height;
videoScreen.height = newVideoHeight;
videoScreen.scaleX = videoScreen.scaleY;

// Reposition the control bar.
controlBar.y = newVideoHeight;

```

}  
[/COLOR]  
swfStage.addEventListener(Event.RESIZE, resizeDisplay);

Can this be done and if so how? Thank you in advance for any help given.

Dave.
