import mx.transitions.Tween;
import mx.transitions.easing.*;
prova = new function () {
}();
mio_xml = new XML();
mio_xml.path = this;
mio_xml.ignoreWhite = true;
mio_xml.onLoad = function(success) {
if (success) {
var nodes = this.firstChild.childNodes;
_root.avvisotitoli.titolo = "";
titoli = new Array();
intervalli = new Array();
testi = new Array();
for (var n = 0; n<nodes.length; n++) {
var titolo = this.firstChild.childNodes[n].attributes.titolo;
var intervallo = this.firstChild.childNodes[n].attributes.intervallo;
var testo = this.firstChild.childNodes[n].nodeValue;
_root.avvisotitoli.titolo.height = 20*n;
_root.avvisotitoli.titolo += "Titolo: "+titolo+"
";
titoli[n] = titolo;
intervalli[n] = intervallo;
testi[n] = testo;
}
} else {
_root.avvisotitoli.titolo = "Caricamento errato";
}
var down = 0;
var t = 1000;
for (var d = 0; d<intervalli.length; d++) {
IntervalID = setInterval(controllo, t);
function controllo() {
new Tween(avvisotitoli, "_y", mx.transitions.easing.Elastic.easeOut, 0+down, 20+down, 2, true);
clearInterval(IntervalID);
down = down+40;
t = intervalli[d];
_root.avvisotesto.testo = testi[d];
}
}
};
mio_xml.load("avvisi.xml");