scriverei il codice non sui pulsanti ma sulla frame della timeline che li ospita
Codice PHP:
// importo effetti
import mx.transition.*
import mx.transition.easy.*
// registro nuove coordinate e variabile per caricare filmato
pulsanteA.targetX = 100
pulsanteA.targetY = 250
pulsanteA.varLink="clip1"
// quando premo e rilascio, faccio muovere il pulsante, quando è posizionato mando in play()
pulsanteA.onRelease=function(){
var twX:Tween = new Tween(this, "_x", Strong.easyOut, this._x, this.targetX, 1, true)
var twY:Tween = new Tween(this, "_x", Strong.easyOut, this._x, this.targetY, 1, true)
twY.onMotionFinished = function(){
pulsanteA.gotoAndPlay(59)
}
}
Ciao Rempox