Hi! Something in my code gives me an alert of slow loading time! I am transferring some data from an extern XML-file…
Here’s the AS:
stop();
hypeXML = new XML();
hypeXML.ignoreWhite = true;
hypeXML.load("hype.xml");
hypeXML.onLoad = function(loaded) {
title = [];
excerpt = [];
image = [];
type = [];
if (loaded) {
for (i=0; hypeXML.firstChild.childNodes.length; i++) {
title* = hypeXML.firstChild.childNodes*.attributes.name;
excerpt* = hypeXML.firstChild.childNodes*.attributes.description;
image* = hypeXML.firstChild.childNodes*.attributes.image;
type* = hypeXML.firstChild.childNodes*.attributes.type;
flashTitle0.text = title[0];
flashExcerpt0.text = excerpt[0];
flashImage0.loadMovie(image[0]);
flashType0.text = type[0];
flashTitle1.text = title[1];
flashExcerpt1.text = excerpt[1];
flashImage1.loadMovie(image[1]);
flashType1.text = type[1];
flashTitle2.text = title[2];
flashExcerpt2.text = excerpt[2];
flashImage2.loadMovie(image[2]);
flashType2.text = type[2];
flashTitle3.text = title[3];
flashExcerpt3.text = excerpt[3];
flashImage3.loadMovie(image[3]);
flashType3.text = type[3];
}
} else {
trace("No XML loaded...");
}
};
knapp1.onRollOver = function() {
fader.loadMovie("http://localhost/wordpress/wp-content/themes/dfblog/fade.swf","2");
imgCont.loadMovie("http://localhost/wordpress/wp-content/themes/dfblog/bild1.jpg");
};
knapp2.onRollOver = function() {
fader.loadMovie("http://localhost/wordpress/wp-content/themes/dfblog/fade.swf","2");
imgCont.loadMovie("http://localhost/wordpress/wp-content/themes/dfblog/bild2.jpg");
};
knapp3.onRollOver = function() {
fader.loadMovie("http://localhost/wordpress/wp-content/themes/dfblog/fade.swf","2");
imgCont.loadMovie("http://localhost/wordpress/wp-content/themes/dfblog/bild3.jpg");
};
knapp4.onRollOver = function() {
fader.loadMovie("http://localhost/wordpress/wp-content/themes/dfblog/fade.swf","2");
imgCont.loadMovie("http://localhost/wordpress/wp-content/themes/dfblog/bild4.jpg");
};
knapp1.tabIndex = 1;
knapp2.tabIndex = 2;
knapp3.tabIndex = 3;
knapp4.tabIndex = 4;