MovieClip.prototype.saltaScala = function(l, obj, fattore, rallentamento) {
this.oldD=this.getDepth()
this.onRollOver=function(){
brano = new Sound();
brano.loadSound("sound2.mp3", true);
this.swapDepths(100);
}
this.onRollOut=function(){
brano = false;
this.swapDepths(this.oldD);
};
this.tempo += (obj - this._xscale) * fattore;
this.tempo *= rallentamento;
this._xscale = this._yscale += this.tempo;
};
for (var i = 1; i <= 6; i++) {
this["foto" + i].onEnterFrame = function() {
switch (i) {
case 1: locale = "locale1"; break;
case 2: locale = "locale2"; break;
case 3: locale = "locale3"; break;
case 4: locale = "locale4"; break;
case 5: locale = "locale5"; break;
case 6: locale = "locale6"; break;
default: l=""; break;
};
this.onPress = function() {
getURL("home.php?scelta=location&locale="+ locale);
};
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.saltaScala(l, 80, .2, .7);
} else {
this.saltaScala(l, 50, .1, .7);
}
};
}