tags:

views:

205

answers:

2

I am going to embed a Flex app on an html page. The html page is already going to have a scroll bar to scroll up and down. The contents of the flex app are very dynamic, and I don't want to have an extra scroll bar when there is already one. So is there a way to make the height of the swf match the height of the contents of the swf?

Thanks!

+3  A: 

Have the SWF make an ExternalInterface call to resize itself in JavaScript.

  1. The SWF loads waits for all of its content to load and layout.
  2. Once everything is laid out, the SWF makes an ExternalInterface call to a function you write in JavaScript to resize the SWF
  3. The SWF adds a resize event listener on the main content in case anything changes down the road.
Brian
I found it best to set the SWF to be 100% and contain it within a DIV, then I could control the DIV width and height much easier.
Magnus Smith
A: 

Here's a good post that deals with your problem:

Hooray Im Helping