Código:
square._alpha = 0; whichPic = 1; next.onPress = function() { if (whichPic<6 && !fadeIn && !fadeOut) { fadeOut = true; whichpic++; input = whichPic; } }; back.onPress = function() { if (whichPic>1 && !fadeIn && !fadeOut) { fadeOut = true; whichpic--; input = whichPic; } }; _root.onEnterFrame = function() { if (square._alpha>10 && fadeOut) { square._alpha -= 10; } if (square._alpha<10) { loadMovie("../images/image"+whichPic+".jpg", "square"); fadeOut = false; fadeIn = true; } if (square._alpha<100 && fadeIn && !fadeOut) { square._alpha += 10; } else { fadeIn = false; } if (input>6) { input = 6; } if (Key.isDown(Key.ENTER)) { fadeOut = true; whichpic = input; } }; inputField.onKillFocus = function() { input = whichPic; };