# \_alpha problem

**URL:** <https://forum.kirupa.com/t/-alpha-problem/171206>\
**Category:** flash\
**Created:** [December 2, 2005, 6:58pm UTC](https://forum.kirupa.com/t/-alpha-problem/171206 "2005-12-02T18:58:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rynobot](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rynobot](https://forum.kirupa.com/u/rynobot)\
**Post date:** [December 2, 2005, 6:58pm UTC](https://forum.kirupa.com/t/-alpha-problem/171206/1 "2005-12-02T18:58:48Z")

</div>

i’m using this code, which loads the xml image and fades it in etc:

```auto
// ////// 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:

```auto
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.
