# Help me! As2 -\> as3

**URL:** https://forum.kirupa.com/t/help-me-as2-as3/304583
**Category:** Uncategorized
**Created:** [February 10, 2010, 12:12pm UTC](https://forum.kirupa.com/t/help-me-as2-as3/304583 "2010-02-10T12:12:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![matte78](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@matte78](https://forum.kirupa.com/u/matte78)
#### Post date: [February 10, 2010, 12:12pm UTC](https://forum.kirupa.com/t/help-me-as2-as3/304583/1 "2010-02-10T12:12:54Z")

</div>

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();
