i made this xml ...
HTML Code:
<cinemix>
<movie id="1">
<name>abc</name>
<pic jpgURL="movie2\movie_1129287724.jpg"></pic>
<movie id="2">
<name>abc</name>
<pic jpgURL="movie2\aa.jpg"></pic>
<movie id="3">
<name>abc</name>
<pic jpgURL="movie2\bb.jpg"></pic>
<movie id="4">
<name>abc</name>
<pic jpgURL="movie2\cc"></pic>
my action script like...
HTML Code:
function loadimage() {
kk = myXML.firstChild.childNodes;
for (var i=0; i<=kk.length; i++) {
movie1 = kk[i].firstChild.nextSibling.attributes.jpgURL;
movie2 = kk[i].firstChild.nextSibling.attributes.jpgURL;
movie3 = kk[i].firstChild.nextSibling.attributes.jpgURL;
movie4 = kk[i].firstChild.nextSibling.attributes.jpgURL;
loadMovie(movie1, movie);
loadMovie(movie2, movie_2);
loadMovie(movie3, movieThree);
loadMovie(movie4,movie_4);
}
}
var myXML = new XML();
myXML.ignoreWhite = true;
myXML.load("xml/test.xml");
myXML.onLoad = loadimage;
as you can see from the above , there are four movie tags which contains four different images ..but why i can't load the image properly through my action script ?
1)what is the errors in my script?
2)is there any correct way to load images by "for-loop"?
please help..Thank you very much!