Ciao a tutti. In internet ho trovato questo codice che mi permette di identificare l'ultimo bottone cliccato e di "smontarlo" al click di un altro bottone. Link per il fla
Avrei però bisogno, appena si carica il menù, di far trovare acceso il primo bottone.
Qualcuno mi può aiutare?
codice:// USAGE: // myButton.onRelease = onClick; // myButton.onRollOver = overOut; // myButton.onRollOut = overOut; var lastClicked = null; function onClick() { if ( this.select = !this.select ) { this.gotoAndStop( "released" ); lastClicked.gotoAndPlay( "out" ); lastClicked.select = false; lastClicked = this; } else { this.gotoAndPlay( "out" ); lastClicked = null; } } function overOut() { this.over = !this.over; if (!this.select ) this.gotoAndPlay( ( this.over ) ? "over" : "out" ); } ////////////////////////////////////////// for (var i=1; i<10; i++) { var curBtn = this[ "b" + i ]; curBtn.over = false; curBtn.select = false; curBtn.onRelease = onClick; curBtn.onRollOver = curBtn.onRollOut = curBtn.onReleaseOutside = overOut; }