Stage.showMenu = false;
setProperty("", _quality, "BEST");
avanti.testoPuls.text = "avanti";
indietro.testoPuls.text = "indietro";
pulsanti = new Array("avanti", "indietro");
for (i = 0; i < 2; i++)
{
puls = eval(pulsanti[i]);
puls.onRollOver = function ()
{
this.testoPuls.textColor = 3342336;
};
puls.onRollOut = puls.onReleaseOutside = function ()
{
this.testoPuls.textColor = 16737792;
};
puls.onRelease = function ()
{
this._name == "avanti" ? (vediFoto++) : (vediFoto--);
this.testoPuls.textColor = 3342336;
c = setInterval(alfaMeno, 50);
};
} // end of for
stop ();
function alfaPiu()
{
if (imgEsterne._alpha < 99)
{
imgEsterne._alpha = imgEsterne._alpha + 10;
}
else
{
imgEsterne._alpha = 99;
clearInterval(b);
vediFoto == totFoto ? (avanti.enabled = false) : (avanti.enabled = true);
vediFoto == 1 ? (indietro.enabled = false) : (indietro.enabled = true);
} // end else if
} // End of the function
function alfaMeno()
{
avanti.enabled = false;
indietro.enabled = false;
if (imgEsterne._alpha > 0)
{
imgEsterne._alpha = imgEsterne._alpha - 10;
}
else
{
clearInterval(c);
caricaFoto();
} // end else if
} // End of the function
function caricaFoto()
{
imgEsterne.loadMovie("foto_1/foto_" + vediFoto + ".jpg");
a = setInterval(preloadFOTO, 50);
perc = 0;
} // End of the function
function preloadFOTO()
{
car = imgEsterne.getBytesLoaded();
tot = imgEsterne.getBytesTotal();
perc = Math.round(car * 100 / tot);
loading.text = "Loading... " + perc + "%";
pre._width = perc / 2;
if (car > 1024)
{
if (car == tot && _root.imgEsterne._width > 0)
{
imgEsterne._x = (StageLarg - imgEsterne._width) / 2;
imgEsterne._y = (StageAlt - imgEsterne._height) / 2;
loading.text = "";
pre._width = 0;
clearInterval(a);
b = setInterval(alfaPiu, 50);
if (auto == "si")
{
attesa = setInterval(function ()
{
if (vedifoto == totFoto)
{
vediFoto = 1;
}
else
{
++vediFoto;
} // end else if
c = setInterval(alfaMeno, 50);
clearInterval(attesa);
}, tempo + "000");
}
else
{
avanti._visible = true;
indietro._visible = true;
} // end if
} // end if
} // end else if
} // End of the function
StageLarg = 822;
StageAlt = 626;
avanti._visible = false;
indietro._visible = false;
imgEsterne._alpha = 0;
dati = new LoadVars();
dati.load("dati_galleria.txt");
dati.onLoad = function ()
{
var _loc1 = _root;
var _loc2 = this;
totFoto = _loc2.totalefoto;
auto = _loc2.auto;
tempo = _loc2.tempo;
rgbsfondo = _loc2.rgbsfondo;
audio = _loc2.audio;
urlaudio = _loc2.urlaudio;
titoloaudio = _loc2.titoloaudio;
if (audio == "si")
{
_loc1.suono.titolo.text = titoloaudio;
_global.my_sound = new Sound();
my_sound.loadSound(_loc1.urlaudio, true);
my_sound.onSoundComplete = function ()
{
my_sound.start();
};
}
else
{
_global.my_sound = new Sound();
_loc1.suono.gotoAndStop("audiono");
} // end else if
colore = new Color(sfondo);
colore.setRGB("0x" + rgbsfondo);
trace ("Numero di immagini:: " + _loc1.totFoto);
trace ("Visualizzazione automatica:: " + _loc1.auto);
trace ("Tempo di attesa:: " + _loc1.tempo);
trace ("Audio:: " + _loc1.audio);
trace ("Indirizzo del audio:: " + _loc1.urlaudio);
trace ("Nome Audio:: " + _loc1.titoloaudio);
trace ("Colore di sfondo:: " + _loc1.rgbsfondo);
vediFoto = 1;
caricaFoto();
};