1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
//Chargement du fichier XML
my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(ok) {
if (ok) {
start_load_img();
} else {
trace("XML not loaded");
}
};
var my_image_list = new Array();
//my_xml.load((String(_url.slice(0, (_url.length-3))))+"xml");
my_xml.load("slide_show.xml"); //Charge le fichier XML
// debut de la fonction si le XML est loade
function start_load_img() {
//display_time = int(my_xml.firstChild.childNodes[0].attributes.display_time);
for (i=1; i<my_xml.firstChild.childNodes.length; i++) {
this["path"+i] = my_xml.firstChild.childNodes[i].attributes.path;
my_image_list.push(my_xml.firstChild.childNodes[i].attributes.path);
}
currrent_image = 0;
//Creation des différents clip
var lv = new LoadVars();
for(i=1; i<=my_image_list.length; i++) {
lv.onLoad = function(ok){}
lv.load(my_image_list[i-1]);
}
} |
Partager