dynamically resize main movie

Posted on 2004-10-27
Medium Priority
Last Modified: 2010-05-18
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?
Question by:skibama1
LVL 27

Accepted Solution

negatyve earned 750 total points
ID: 12420359
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

Author Comment

ID: 12420633
Can you explain your code a little bit.  That looks like what I want to do.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question