Salve,
ho un pulsante che esegue le seguenti operazioni.
prende un valore da una campo di testo input (_root.pag) e a seconda del valore lo somma ad un secondovalore variabile..ve lo riporto qui sotto:
on (release, keyPress "<Enter>" ) {
if (0 < int(_root.pag) < 43) { _root.dest = int(_root.pag) + 121;
} else if (int(_root.pag) == 43) { _root.dest = 182;
} else if (43 < int(_root.pag) < 49) { _root.dest = int(_root.pag) + 158;
} else if (int(_root.pag) == 49) { _root.dest = 226;
} else if (49 < int(_root.pag) < 124) { _root.dest = int(_root.pag) + 196;
} else if (int(_root.pag) == 124) { _root.dest = 338;
} else if (124 < int(_root.pag) < 129) { _root.dest = int(_root.pag) + 233;
} else if (int(_root.pag) == 129) { _root.dest = 381;
} else if (129 < int(_root.pag) < 132) { _root.dest = int(_root.pag) + 271;
} else if (int(_root.pag) == 132) { _root.dest = 422;
} else if (132 < int(_root.pag) < 136) { _root.dest = int(_root.pag) + 309;
} else if (int(_root.pag) == 136) { _root.dest = 464;
}
_root.all.pagine.gotoAndPlay(_root.dest);
}
Alla fine il bottone dovrebbe rimandare il navigatore al frame risultante dalla somma di cui prima...
Incomprensibilmente viene aggiunto sempre 121, ovvero il primo valore del ciclo iterativo...è come se gli else che seguono non vengano neppure presi in considerazione... dove sbaglio??nella prima condizione dell'if??come fa a risultare sempre vera??
grazie..