Websites with fullscreen image background
Websites with fullscreen image background
Out of context: Reply #22
- Started
- Last post
- 52 Responses
- felizfeliz0
To do it in flash use my simple code which always fills the screen with your image and maintains aspect ratio. just put your backgound image in a movieclip called "bg_mc":
Stage.scaleMode = "noScale";
Stage.align = "TL";
bg_mc.onResize = function() {
this._x = 0;
this._y = 0;
if (Stage.width === Stage.height) {
}else{
if (Stage.width < Stage.height){
this._height = Stage.height;
this._xscale = this._yscale;
if(this._width < Stage.width){
this._width = Stage.width;
this._yscale = this._xscale;
}
}else{
this._width = Stage.width;
this._yscale = this._xscale;
if(this._height < Stage.height){
this._height = Stage.height;
this._xscale = this._yscale
}
}
}
};
Stage.addListener(bg_mc);
bg_mc.onResize();- nice but cud do with a small code to smooth the image if enlarged too muchWeLoveNoise
- that's your code? nice one. and there was me thinking that was just how everyone did it.skt
- in your library set the image to 'allow smoothing'.felizfeliz