dynamically resize main movie

Let's say I have a webpage with 3 rows (maximized to 100% width).  Row 1 is a header and Row 3 is a footer and will stay constant in height.  Row 2 is content and will change according to the users screen resolution. So theoretically this should work:

Row 1 & 3 movie: set stage dimensions to 640 width, create a movie symbol with bg rectangle make it's height the hieght you want the header or footer to be, at runtime AttachMovie and change it's width to match System.capabilities.screenresolutionX.  Publish movie as 100% width and blank the height setting in DW.

Row 2 - do the same thing but it's height would equal (row1 + row3) - system.capabilities.screenresolutionY

Other content elements could be added at runtime from the library in a similar method.

This should maximize the width and height for the entire screen regardless of the browsers dimensions.  You should also be able to set the justification on the table rows to center so that residual whitespace will be evened out at the sides.

But what I am getting is more akin to a swf that either doesn't fill up the main screen or is too much for the main screen OR the justification is off.  Also, I had to subtract off units of the screenresolutionX to get the attached movie to fill the screen.

I think what I am doing wrong is assuming that  a movie set to screen dimensions within another movie that is set to max width of screen dimensions would fill up the screen.

Shouldn't there be an easier way? Why can't I change the dimensions of the main movie stage at runtime via AS?  or can i?
LVL 1
skibama1Asked:
Who is Participating?
 
negatyveCommented:
You can, but beware: System.capabilities.screenResolutionX and System.capabilities.screenResolutionY are monitor sizes, not browser visible are sizes.
See if this can help you:

sample: http://flash-mx.html.it/articoli/swf/negatyve_stage/esempio007.html
source: http://flash-mx.html.it/articoli/zip/negatyve_stage/esempio007.zip
0
 
skibama1Author Commented:
Can you explain your code a little bit.  That looks like what I want to do.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.