# Visible function for buttons of a slideshow not working

**URL:** <https://forum.kirupa.com/t/visible-function-for-buttons-of-a-slideshow-not-working/176497>\
**Category:** Uncategorized\
**Created:** [January 24, 2006, 4:45pm UTC](https://forum.kirupa.com/t/visible-function-for-buttons-of-a-slideshow-not-working/176497 "2006-01-24T16:45:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joco18](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@joco18](https://forum.kirupa.com/u/joco18)\
**Post date:** [January 24, 2006, 4:45pm UTC](https://forum.kirupa.com/t/visible-function-for-buttons-of-a-slideshow-not-working/176497/1 "2006-01-24T16:45:04Z")

</div>

Whoever can figure this out: I’ll will deam you a genius!

I’m working with a dynamic slideshow that was already set up. Instead of thumbnails each image has a button that you click to see the image. I cant get the buttons to turn off for the categories that have less than 26 images. I put the site as it is so far up here: [http://www.teamredstudio.com/sample/ljsalkinphotography/site](http://www.teamredstudio.com/sample/ljsalkinphotography/site)

the button instance names are imgB1, imgB2, etc… they are in a container that is called: mc,collection\_menu  
with an instance name of: collection\_Menu  
basically in the script bellow the: visible=false is not working, is this the right syntax… what is wrong here…

Thanks you so much joseph aka teamred

```auto
// this is the main button to start the slide show
collButtHolder.Bali.onRelease = function() {
	//move the to menu down to reveal the slide show components
	slide(collButtHolder,-155);
	slide(hide,725);

	// call the function to set up slide show or reset it you had other buttons
	// this is where you set your path to the photos and how many photos are in that folder.

	collectionMenu.bName.text = "Bali";
	collectionMenu.nValue=(1)
	_root.changePhoto(-1);

	_root.collectionMenu.imgB1._visible=TRUE
	_root.collectionMenu.imgB2._visible=TRUE
	_root.collectionMenu.imgB3._visible=TRUE
	_root.collectionMenu.imgB4._visible=TRUE
	_root.collectionMenu.imgB5._visible=TRUE
	_root.collectionMenu.imgB6._visible=TRUE
	_root.collectionMenu.imgB7._visible=TRUE
	_root.collectionMenu.imgB8._visible=TRUE
	_root.collectionMenu.imgB9._visible=TRUE
	_root.collectionMenu.imgB10._visible=TRUE
	_root.collectionMenu.imgB11._visible=TRUE
	_root.collectionMenu.imgB12._visible=False
	_root.collectionMenu.imgB13._visible=False
	_root.collectionMenu.imgB14._visible=False
	_root.collectionMenu.imgB15._visible=False
	_root.collectionMenu.imgB16._visible=False
	_root.collectionMenu.imgB17._visible=False
	_root.collectionMenu.imgB18._visible=False
	_root.collectionMenu.imgB19._visible=False
	_root.collectionMenu.imgB20._visible=False
	_root.collectionMenu.imgB21._visible=False
	_root.collectionMenu.imgB22._visible=False
	_root.collectionMenu.imgB23._visible=False
	_root.collectionMenu.imgB24._visible=False
	_root.collectionMenu.imgB25._visible=False
	_root.collectionMenu.imgB26._visible=False

};

function slide(mc, ty) {
	mc.onEnterFrame = function() {
		mc._x += (ty-mc._x)/5;
		if (Math.abs(ty-mc._x)<0.4) {
			this._x = ty;
			delete mc.onEnterFrame;
		}
	};
}

```
