io ho questo codice che mi crea un effetto ingrandimento graduale sulle foto quando sono toccate dal mouse.
Ho bisogno di implementare l'animazione con l'evento onPress per aprire un URL dinamico con una variabile diversa a seconda della foto cliccata.
Sembra facile ma non riesco a gestire quel for. In pratica come risultato mi da sempre il valore di default quindi locale = "".
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);
}
};
}
Come faccio a far variare la varibile "locale"?