vi spiego il problema...
ho una serie di mc dentro un mc contenitore(movieCont) impilati in altezza...
ho poi un menu con dei pulsanti che quando clicco mi spostano dal mc in cui sto al mc dove devo andare...
faccio lo spostamento tramite tween sulla _y del movie contenitore...
i paramentri, quindi y iniziale, y finale, tempo etc.. che servono alla tween ci sono, cioè numericamente non sono undefined o NaN.. il problema è che il tween non funziona... mi sparisce tutto il mc contenitore come se diventasse invisibile... andando a fare il debug pero la visibilià è true...
ho provato a mettere la chiamata del prototype che fa il tween su un frame diverso(in pratica su 2 frame, 1 c'è la prototype e la funzione di tween e sull'altro il menu che richiama...) ma nisba...
![]()
![]()
probabilmente è un errore banale ma non ne esco...
bò...
vi posto il codice
Codice PHP:import mx.transitions.*;
import mx.transitions.easing.*;
var current = _root.movieCont.content1._y;
function menuMove(input:MovieClip) {
var final = input._y;
trace("current position: "+current+" FINAL POSITION: "+final);
_root.movieCont.easeIt(_root.movieCont,current, final, 3);
}
MovieClip.prototype.easeIt = function(mc:MovieClip,inizio, fine, tempo){
trace("PARAMETRI "+inizio+" "+fine+ " " +tempo);
var tipo = Bounce.easeIn;
muovi = new Tween(this,"_y",tipo,inizio,fine,tempo,true);
var tweenListener:Object = new Object();
tweenListener._fine = fine;
//
tweenListener.onMotionFinished = function():Void {
trace("finito " + mc._name);
trace(this._fine);
current = this._fine;
};
muovi.addListener(tweenListener);
}
// azioni ai pulsanti del menu
_root.b1.onRelease = function() {
_root.menuMove(_root.movieCont.content1);
};
_root.b2.onRelease = function() {
_root.menuMove(_root.movieCont.content2);
};
_root.b3.onRelease = function() {
_root.menuMove(_root.movieCont.content3);
};
_root.b4.onRelease = function() {
_root.menuMove(_root.movieCont.content4);
};
![]()

Rispondi quotando