Setting Visibility for Next/Prev Buttons

I have pages of info I’m pulling from external files. I want my btn_next to not be visible when the last page loads and my btn_prev to not be visible when the first page loads. The btns are actually moviclips with instance names btn_next and btn_prev Here is my code:

//Stage Scale
Stage.scaleMode = “exactFit”;
width_txt.text = Stage.width;
height_txt.text = Stage.height;
// End Stage Scale

//Stage Resize Listener
var resizeListener:Object = new Object();
resizeListener.onResize = function()
{
width_txt.text = Stage.width;
height_txt.text = Stage.height;
}
Stage.addListener(resizeListener);
// End Stage Resize Listener

// Default Page Number Variable
var currrentPage:Number = 0;

// Movie Clip Variable
var myMCL:MovieClipLoader = new MovieClipLoader();

// Total Pages Var and Load
var myPageTotal:LoadVars = new LoadVars();
myPageTotal.load(“pages/pageTotal.txt”);

//Pages Var
var infoPageTotal:LoadVars = new LoadVars();

// Page Counter Function
function pageCounter():Void
{
txt_pageNumber.text = (currrentPage + 1) + " / " + Number(myPageTotal.totalPages);
}
myPageTotal.onLoad = function(p_success:Boolean):Void
{
if(p_success)
{
pageCounter();
}
else
{
txt_pageNumber.text = “Error loading file.”;
}
}
// End Page Counter Function

// Next Page Function
function nextPage(){
infoPageTotal.load(“pages/page” + currrentPage + “.txt”);
infoPageTotal.onLoad = function(p_success:Boolean):Void
{
if(p_success)
{
txt_page.htmlText = infoPageTotal.info;
}
else
{
txt_page.text = “Error loading file.”;
}
}
}
nextPage();
// End Next Page Function

// Next Button Actions
btn_next.onRelease = function():Void
{
if(currrentPage < Number(myPageTotal.totalPages) - 1)
{
currrentPage ++;
gotoAndPlay(2);
}
else
{
currrentPage = 0;
}
nextPage();
pageCounter();
}
// End Next Button Actions
// Previous Button Actions
btn_prev.onRelease = function():Void
{
if(currrentPage == 0)
{
currrentPage = Number(myPageTotal.totalPages) - 1;
}
else
{
currrentPage --;
gotoAndPlay(6);
}
nextPage();
pageCounter();
}
// End Previous Button Actions
stop();

I’ve tried creating a buttonVisibility function but I’m doing something wrong because it either turns one or the other button off completely. Any help would be greatly appreciate. Thank you in advance.