View Single Post
  #2 (permalink)  
Old Apr 7th, 2004, 13:54
Webforumz Staff Webforumz Staff is offline
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
In Flash 6 a new object, the "Stage" object, was introduced.

This allows you to find out the current size of the swf and you can therefore do things accordingly. On the site you mentioned above, it looks like a background image inside a movieclip is being resized to be the same size as the visible SWF, while the content remains as a fixed size.

You can accomplish this by settings the movie width and height to 100% in the HTML.

You can then use
Code: Select all
Stage.scaleMode = "noScale"
in your actionscript to ensure you get no distortion.

Stage.width and Stage height return the available Stage area.

You can also control Stage.align and other functions.

When you use those functions, they are setting up listeners to the Stage, so that the windows reposition themself whenever the stage resizes.