Tengo un scroll flash (as2), que funciona muy bien. Lo estoy usando en la web: www.masscultura.com
Es el scroll que está a la derecha de la revista, con un botón arriba y abajo para elegir la revista que quieres ver. Quiero añadir a los botones una función más. Como es un código que no está desarrollado por mi, me gustaría que me ayude un experto.
Quiero conseguir hacer que, si pulso el botón de abajo y llegue a la primera foto de publicación de la revista, el botón desaparezca, quedando sólo el de arriba lógicamente y lo mismo en viceversa.
Dejo el código:
Código :
import caurina.transitions.Tweener; // Setup buttons this.bBackward._alpha = 70; this.bBackward.onRollOver = function() { Tweener.addTween(this, {_alpha:100, time:0.6}); }; this.bBackward.onRollOut = this.bBackward.onReleaseOutside = function() { Tweener.addTween(this, {_alpha:70, time:0.6}); }; this.bBackward.onRelease = function() { this._parent.scrollList(-1); }; this.bForward._alpha = 70; this.bForward.onRollOver = function() { Tweener.addTween(this, {_alpha:100, time:0.6}); }; this.bForward.onRollOut = this.bForward.onReleaseOutside = function() { Tweener.addTween(this, {_alpha:70, time:0.6}); }; this.bForward.onRelease = function() { this._parent.scrollList(+1); }; // Setup data this.currentPosition = 0; this.maxPosition = 7; // Moving functions this.scrollList = function(p_offset:Number): Void { this.gotoPosition(this.currentPosition + p_offset); }; this.gotoPosition = function(p_position:Number): Void { // Goes to a certain position p_position = p_position < 0 ? 0 : p_position > this.maxPosition ? this.maxPosition : p_position; if (p_position != this.currentPosition) { this.currentPosition = p_position; Tweener.addTween(this.itemList, {_y:27 - (this.currentPosition * 248), time:0.6, transition:"easeoutback"}); } }; this.stop();
Gracias a todos! Espero puedan echarme un cable!.
Kolobo