Forum Moderators: open
I googled it, searched macromedia, flash forums, etc in search of my holy grail but with no definitive solution, and I am not bad at flash scripting!
What I am trying to achieve is a scaleable base movie to fill the screen, with a non scaling movie sat in the centre. I have tried 100% noscale etc, got it working in IE but failing in Firefox.
Can someone point me in the right direction please!
This is usually done in conjunction with javascript and a chromeless window.
<Sorry, no example URLs.
See Forum Charter [webmasterworld.com]>
[edited by: tedster at 2:39 am (utc) on Jan. 14, 2006]
[edited by: tedster at 6:51 pm (utc) on Jan. 14, 2006]
Then put:
Stage.scaleMode = "noScale";
..on the first frame of your movie.
It's never failed for me.
To center your non-scaliing movie do something like this:
this.onEnterFrame = function() {
center();
}stageListen = new Object();
stageListen.onResize = function() {
center();
}
Stage.addListener(stageListen);
//functions
center = function() {
_root.center_mc._y = (Stage.height/2);
_root.center_mc._x = (Stage.width/2);
center_mc is the instance name of the movie you want to be centered within the background movie. This way if the user resizes the window it moves to stay centered.
I also tried
function stageResize() {
scale_mc._width= Stage.width;
scale_mc._height= Stage.width;
}
Stage.scaleMode = "noScale";
myListener = newObject();
myListener.onResize = function() {
stageResize();
};
Stage.addListener(myListener);
Where scale_mc is the supposed scaling clip, (it doesn't)
function stageResize() {
scale_mc._width = Stage.width;
scale_mc._height = Stage.height;
}
function center() {
noscale_mc._y = Stage.height/2;
noscale_mc._x = Stage.width/2;
}
Stage.scaleMode = "noScale";
myListener = new Object();
myListener.onResize = function() {
stageResize();
center();
};
Stage.addListener(myListener);