sul primo frame ho inserito questo codice:
codice:
vis = 1;
scala = true;
Button.prototype.useHandCursor = false;
Stage.align = "";
Stage.scaleMode = "showAll";
wdth = Stage.width;
hght = Stage.height;
Stage.scaleMode = "noScale";
controllo = new Object();
controllo.onResize = function(){
w = Stage.width
h = Stage.height
cx = (w-wdth)/2;
cy = (h-hght)/2;
cy3 = (h-hght)/3;
vis = (w < wdth || h < hght) ? 0 : 1;
scritta._visible = (w < wdth || h < hght) ? 1 : 0;
fascia._height = h;
fascia2._height = h;
for(var i = 1; i < 5; i++){
_root["freccia" + i]._visible = vis;
}
clip._visible = barra._visible = larg._visible = alt._visible = vis;
scaler = scala ? 100+cx/2.8 : 100;
alt._x = Math.round(wdth+cx);
larg._y = Math.round(5-cy);
larg.testo.text = "LARGHEZZA: " + w;
alt.testo.text = "ALTEZZA: " + h;
};
Stage.addListener(controllo);
MovieClip.prototype.move = function(x,y){
this._x += (x-this._x)/4;
this._y += (y-this._y)/4;
};
this.onEnterFrame = function(){
sfondo._xscale = sfondo._yscale = sfondo._yscale + (scaler-sfondo._yscale)/2;
freccia1.move(30-cx,30-cy);
freccia2.move(wdth-2+cx,2-cy);
freccia3.move(wdth-2+cx,hght-2+cy);
freccia4.move(2-cx,hght-2+cy);
logocap_mc.move(15-cx,15-cy);
menu_mc.move(15-cx,100-cy);
contenuti_mc.move(wdth/4.3,25-cy3);
};
controllo.onResize();
In cui lo stage rimane al centro e degli mc sullo sfondo si 'allungano' verticalmente.