flash q
- Started
- Last post
- 3 Responses
- nadnerb
I looked for this for a while - in the help files, tutorial sites etc. but I don't really know what to search for.
How do I get an object in a .swf to respond to browser adjustments? I mean when everything stays the same size except the bg stretches to fit the browser, or everything stays in one place except one thing keeps a position in relation to the size of the .swf. i.e. - - -http://www.beck.com/
http://www.hi-res.net/anyone? thanks.
- visualplane0
Add the following code to your main stage.
this.myListener = new Object();
this.myListener.onResize = function() {
repos();
};Stage.addListener(this.myListene...
Stage.align = "TL";
Stage.scaleMode = "noScale";
function repos() {
//bg is the instance name of a movieclip inside that will resizebg._height = Stage.height;
bg._width = Stage.width;
bg._x = 0;
bg._y = 0;//topbar is a loaded from a external swf with a movieclip inside with a instance name topbar
_level5.topbar._x = 0;
_level5.topbar._y = 0;
_level5.topbar._width = Stage.width;_level5.lowbar._x = 0;
_level5.lowbar._y = 587;
_level5.lowbar._width = Stage.width;
_level5.lowbar._height = Stage.height - 587_level4.gradient._x = 0;
_level4.gradient._y = 108;
_level4.gradient._width = Stage.width;_level4.text._x = 485;
_level4.text._y = 121.5;}
repos()function loadEverything() {
loadMovieNum("bars.swf",5);
loadMovieNum("nav.swf",4);
//these are external movies that will resize at different widths
repos()
}loadEverything()
- blaw0
that'll be really handy.
thanks, vp.
- nadnerb0
Nice, thanks a lot.
looks pretty simple. I'd finally found that "Stage" stuff a few minutes ago but I wasn't quite sure how to implement it.