i’m using this code, which loads the xml image and fades it in etc:
// ////// XML Load Functions
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
}
loadImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("background/background.xml");
// //////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else if (picture._alpha<100) {
preloader._visible = false;
picture._alpha += 10;
}
};
// //////
function loadImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[random(total)], 1);
}
}
// //////
stop();
Then on I have a button, which i want to use to fade the picture to an alpha of 0:
navWho.onRelease = function() {
_root.picture._alpha = 0;
_root.gotoAndStop(3);
};
However, the movieclip ‘picture’ will fade out to 0 and then fade right back up to 100% alpha?
Something is conflicting, but i can’t figure it out. can anyone help?
thanks.