oops, ho letto ora AS3, un attimo
[edit] ecco qui:
Codice PHP:
var salto:uint = 1;
A.addEventListener(MouseEvent.CLICK, clickHandler);
B.addEventListener(MouseEvent.CLICK, clickHandler);
C.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler (e:MouseEvent) {
switch (e.target) {
case A:
if (this.currentFrame == 30) {
this.gotoAndPlay(31);
salto = 1;
}
break;
case B:
if (this.currentFrame == 10) {
this.gotoAndPlay(11);
salto = 21;
}
break;
case C:
if (this.currentFrame == 10) {
this.gotoAndPlay(11);
salto = 41;
}
break;
}
}
Il codice dovrebbe essere abbastanza chiaro.