west001
Messages postés3Date d'inscriptionmardi 9 novembre 2004StatutMembreDernière intervention26 février 2006
-
25 févr. 2006 à 00:43
syndrael
Messages postés2378Date d'inscriptionlundi 4 février 2002StatutMembreDernière intervention29 décembre 2012
-
26 févr. 2006 à 13:09
bonsoir,
j'ai un probleme pour charger différentes parties dans un meme xml.
Le code fonctionne tres bien, mais il me charge toujours la partie entre et .
Que dois je donc changer dans ma frame 2 et/ou dans mon xml pour qu'il charge la partie entre et /?
C'est super urgent, donc avis aux pro...
merci d'avance
voila mon xml :
<?xml version= "1.0" encoding="utf-8" standalone="yes"?>
photos/work/culture/bruxel1.jpg
photos/work/culture/bruxel2.jpg
photos/work/culture/autour1.jpg
photos/work/culture/autou2.jpg
voila le code sur ma frame 1:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image1 = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image1[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("photos/work/work.xml");
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image1[p], 1);
picture_num();
} }}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image1[p], 1);
picture_num();
}}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image1[0], 1);
picture_num();
}}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
voila le code sur ma frame 2:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image2 = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image21[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("photos/work/work.xml");
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image1[p], 1);
picture_num();
} }}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image2[p], 1);
picture_num();
}}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image2[0], 1);
picture_num();
}}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
west001
Messages postés3Date d'inscriptionmardi 9 novembre 2004StatutMembreDernière intervention26 février 2006 26 févr. 2006 à 11:46
Non car si j'inclus image 1 et image 2 dans ils me charge d'un coup image 1 et image 2. alors que moi je veux sur une frame le chargement d'une section et une une autre frame le chargement dune autre section. Sinon je dois creer une xml pour chaque menu, et j'en ai 40...