ora nn posso provare niente ma prova magari a fare
Codice PHP:
//initialize variables and properties
finestra._alpha = 0;
_global.whichPic = 1;
//initiate change to new image when buttons are clicked
next.onPress = function() {
if (_global.whichPic<11 && !fadeIn && !fadeOut) {
fadeOut = true;
_global.whichPic++;
input = _global.whichPic;
}
};
back.onPress = function() {
if (_global.whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
_global.whichPic--;
input = _global.whichPic;
}
};
function loading(clip, width, height){
clip._alpha=0;
car = clip.getBytesLoaded();
tot = clip.getBytesTotal();
if(car == tot && tot>24){
clearInterval(a);
clip._width = width;
clip._height = height;
tempo = setInterval(function () {
clip._alpha=100;
clearInterval(tempo)},200);
}
}
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (finestra._alpha>10 && fadeOut) {
finestra._alpha -= 10;
}
if (finestra._alpha<10) {
loadMovie("images/"+_global.whichPic+".jpg","finestra");
a = setInterval(loading, 50, finestra, 150, 100);
fadeOut = false;
fadeIn = true;
}
if (finestra._alpha<100 && fadeIn && !fadeOut) {
finestra._alpha += 10;
} else {
fadeIn = false;
}
// limit input field
if (input>11) {
input = 11;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
_global.whichPic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = _global.whichPic;
};
sostituendo nel preload con la parte di Julius86
prova un pò dato che nn so se funge...in quello script