| View previous topic :: View next topic |
| Author |
Message |
Jony
Joined: 18 Mar 2005 Posts: 71
|
Hi,
I'm new here and fairly new to flash. I'm redesigning my website at the moment and was wondering how you could make a background stretch to whatever screen resolution you're running at, for example: http://www.hi-res.net
Thank in advance |
| |
|
|
|
|
Jake
Joined: 15 Mar 2005 Posts: 68
|
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:
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. |
| |
|
|
|
|