Hello!
Anyone know traslate this script from AS2 to AS3?
vis = 1;
scala = false;
Button.prototype.useHandCursor = false;
Stage.align = “”;
Stage.scaleMode = “showAll”;
Stage.scaleMode = “noScale”;
controllo = new Object();
controllo.onResize = function(){
w = Stage.width
h = Stage.height
cx = (w-wdth)/2;
cy = (h-hght)/2;
vis = (w < wdth || h < hght) ? 0 : 1;
scritta._visible = (w < wdth || h < hght) ? 1 : 0;
fascia._width = w;
for(var i = 1; i < 5; i++){
_root[“freccia” + i]._visible = vis;
}
logo._visible = barra._visible = larg._visible = alt._visible = vis;
scaler = scala ? 100+cx/1.5 : 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;
};
barra.pulsante.onRelease = function(){
_root.scala = !_root.scala;
controllo.onResize();
};
this.onEnterFrame = function(){
logo._xscale = logo._yscale = logo._yscale + (scaler-logo._yscale)/3;
barra.move(wdth/2,hght-2+cy)
freccia1.move(2-cx,2-cy);
freccia2.move(wdth-2+cx,2-cy);
freccia3.move(wdth-2+cx,hght-2+cy);
freccia4.move(2-cx,hght-2+cy);
};
controllo.onResize();