Ho notato adesso che nel tuo penultimo messaggio la funzione rettDesMove aveva un errore:
Va sostituito con:codice:MovieClip.prototype.rettDesMove = function(pos:Number, alt:Number) { var path:MovieClip = this; var tx = new Tween(path, "_x", Strong.easeOut, this._x, pos, 30, false); tx.onMotionFinished = function() { var ry = new Tween(path, "_height", Strong.easeOut, this._height, alt, 30, false); }; };
Per quanto riguarda l'applicazione a due clip, ho fatto una prova. I nomi istanza sono mioClip1 e mioClip2. Il codice usato è il seguente:codice:MovieClip.prototype.rettDesMove = function(pos:Number, alt:Number) { var path:MovieClip = this; var tx = new Tween(path, "_x", Strong.easeOut, this._x, pos, 30, false); tx.onMotionFinished = function() { var ry = new Tween(path, "_height", Strong.easeOut, path._height, alt, 30, false); }; };
A me funziona tutto perfettamentecodice:import mx.transitions.*; import mx.transitions.easign.*; MovieClip.prototype.barraBotMove = function(pos:Number, larg:Number) { var path:MovieClip = this; var ty:Tween = new Tween(path, "_y", Strong.easeOut, path._y, pos, 30, false); ty.onMotionFinished = function() { trace(larg); var rx = new Tween(path, "_width", Strong.easeOut, path._width, larg, 30, false); }; }; MovieClip.prototype.rettDesMove = function(pos:Number, alt:Number) { var path:MovieClip = this; var tx = new Tween(path, "_x", Strong.easeOut, this._x, pos, 30, false); tx.onMotionFinished = function() { var ry = new Tween(path, "_height", Strong.easeOut, path._height, alt, 30, false); }; }; mioClip1.barraBotMove(0, 500); mioClip2.rettDesMove(0, 500);![]()


Rispondi quotando