Ciao, grazie della risposta, ma pensavo a una cosa tipo questa che posto, solo che ora non so come renderla classe..
nel filmato d'esempio ho una timeline principale di 60 fotogrammi come anche quella dei mccodice:/* al rollover del pulsante via faccio avanzare i mc che voglio fino al fotog che voglio e poi stop dei mc che voglio al rollout al rollover del pulsante rit faccio riavvolgere il mc che voglio fino al fotog che voglio e poi stop dei mc che voglio al rollout */ mc1_mc.stop(); mc3_mc.stop(); //--QUESTO E' QUELLO CHE VORREI INSERIRE NELLA CLASSE-- var esegui:Boolean = false; // function forward(mc:MovieClip, a:Number, azFine:String, azInt:String) { mc.onEnterFrame = function() { if (this._currentframe == this._totalframes || this._currentframe >= a || _root.esegui == false) { this.onEnterFrame = null; if (this._currentframe == a) { //esegui azione di fine corsa trace("-> Eseguo azione finecorsa >> " + azFine); _root[azFine](); } else { //esegui azione di corsa interrotta trace("-> Eseguo azione corsa interrotta >> " + azInt); _root[azInt](); } } else { this.nextFrame(); } }; } function rewind(mc:MovieClip, a:Number, azFine:String, azInt:String) { mc.onEnterFrame = function() { if (this._currentframe == 1 || this._currentframe <= a || _root.esegui == false) { this.onEnterFrame = null; if (this._currentframe == a) { //esegui azione di fine corsa trace("-> Eseguo azione finecorsa >> " + azFine); _root[azFine](); } else { //esegui azione di corsa interrotta trace("-> Eseguo azione corsa interrotta >> " + azInt); _root[azInt](); } } else { this.prevFrame(); } }; } //--FINE DI QUELLO CHE VORREI INSERIRE NELLA CLASSE-- //--Azioni richiamate------ function azFineVai() { trace("-> Funzione azFineVai eseguita"); } function azIntVai() { trace("-> Funzione azIntVai eseguita"); } function azFineRit() { trace("-> Funzione azFineRit eseguita"); } function azIntRit() { trace("-> Funzione azIntRit eseguita"); } //--Pulsanti--------------- vai_btn.onRollOver = function() { esegui = true; forward(mc1_mc, 30, "azFineVai", "azIntVai"); forward(mc3_mc, 50, null, null); forward(_root, 40, null, null); }; vai_btn.onRollOut = function() { esegui = false; }; // rit_btn.onRollOver = function() { esegui = true; rewind(mc1_mc, 10, "azFineRit", "azIntRit"); rewind(mc3_mc, 10); rewind(_root, 10); }; rit_btn.onRollOut = function() { esegui = false; };

Rispondi quotando