# Hide next previous button in gallery

**URL:** <https://forum.kirupa.com/t/hide-next-previous-button-in-gallery/225672>\
**Category:** flash\
**Created:** [May 14, 2007, 8:22pm UTC](https://forum.kirupa.com/t/hide-next-previous-button-in-gallery/225672 "2007-05-14T20:22:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xelaxam](https://avatars.discourse-cdn.com/v4/letter/x/5e9695/32.png) [@xelaxam](https://forum.kirupa.com/u/xelaxam)\
**Post date:** [May 14, 2007, 8:22pm UTC](https://forum.kirupa.com/t/hide-next-previous-button-in-gallery/225672/1 "2007-05-14T20:22:36Z")

</div>

Here is the end of my code to hide the next and previous button (I used the tutorial from kirupa)

if (current\_pos == 1) {  
previous\_btn.\_visible = false;  
}  
else {  
previous\_btn.\_visible = true;  
}  
if (current\_pos == total){  
next\_btn.\_visible = false;  
}  
else {  
next\_btn.\_visible = true;  
}  
stop();

but now the only button that disappear is the next one (it does that at start)…  
What’s the problem ???

Xelaxam
