# Another problem

**URL:** https://forum.kirupa.com/t/another-problem/231291
**Category:** Uncategorized
**Created:** [July 3, 2007, 2:44pm UTC](https://forum.kirupa.com/t/another-problem/231291 "2007-07-03T14:44:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)
#### Post date: [July 3, 2007, 2:44pm UTC](https://forum.kirupa.com/t/another-problem/231291/1 "2007-07-03T14:44:01Z")

</div>

hi! me again…

Got another problem now… I have two buttons that display movieclips when clicked, but I have it so when I click on them they fade in or out. This works, but after I close them or continue the slideshow, the images won’t load in any more. I think it has to do with “onEnterFrame”.

here is the function code I am using to fade in or out my moviclips:

```auto

///thumb/info funcs\\\
function thumbFadeIn1() {
	this.onEnterFrame = function() {
		holder._visible = true;
		thumbsBkg1_mc._visible = true;
		holder._alpha += 2;
		thumbsBkg1_mc._alpha += 2;
		if (holder._alpha>=70) {
			delete this.onEnterFrame;

		}
		if (thumbsBkg1_mc._alpha>=70) {
			delete this.onEnterFrame;
		}
	};
}
function thumbFadeOut1() {
	this.onEnterFrame = function() {
		holder._alpha -= 2;
		thumbsBkg1_mc._alpha -= 2;
		if (holder._alpha<=0) {
			delete this.onEnterFrame;
			holder._visible = false;
		}
		if (thumbsBkg1_mc._alpha<=0) {
			delete this.onEnterFrame;
			thumbsBkg1_mc._visible = false;
		}
	};
}
function infoFadeIn1() {
	this.onEnterFrame = function() {
		info_mc._visible = true;
		info_mc._alpha += 2;
		if (info_mc._alpha>=70) {
			delete this.onEnterFrame;
		}
	};
}
function infoFadeOut1() {
	this.onEnterFrame = function() {
		info_mc._alpha -= 2;
		if (info_mc._alpha<=0) {
			delete this.onEnterFrame;
			info_mc._visible = false;
		}
	};
}
///\\\

```

I think there is a little conflict or something with the “onEnterFrame” with the movieclip that loads the images into the slideshow. Here is the code for that plus a few other things:

```auto

//////////////////Preloader + Other Functions//////////////////
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 {
		preloader._visible = false;
		if (picture._alpha<100) {
			picture._alpha += 2;
		}
	}
};
function nextImage() {
	if (p<(total-1)) {
		p++;
		if (loaded == filesize) {
			picture._alpha = 0;
			picture.loadMovie(image[p],1);
			desc_txt.text = description[p];
			info_mc.desc_txt.text = description[p];
			info_mc.info_txt.text = info[p];
			head_txt.text = heading[p];
			picture_num();
			slideshow();
		}
	}
}
function prevImage() {
	if (p>0) {
		p--;
		picture._alpha = 0;
		picture.loadMovie(image[p],1);
		desc_txt.text = description[p];
		info_mc.desc_txt.text = description[p];
		info_mc.info_txt.text = info[p];
		head_txt.text = heading[p];
		picture_num();
	}
}
function firstImage() {
	if (loaded == filesize) {
		picture._alpha = 0;
		picture.loadMovie(image[0],1);
		desc_txt.text = description[0];
		info_mc.desc_txt.text = description[p];
		info_mc.info_txt.text = info[p];
		head_txt.text = heading[p];
		picture_num();
		slideshow();
	}
}
function picture_num() {
	current_pos = p+1;
	pos_txt.text = current_pos+" of "+total;
	getButtons();
}
////////////////////////////////////////////////////////////////

```

It’s basically some code I used from Kirupa’s thumbnail slideshow tutorial here:

[http://www.kirupa.com/developer/mx2004/thumbnails.htm](http://www.kirupa.com/developer/mx2004/thumbnails.htm)

Any advice would be great! Cheers :p:
