how to hide a widget button after the user release the animated button?

How can I hide my animated widget button after the user released the button?

 ------------------------------------------------------------------------------------------ -- These are the functions triggered by the buttons -- Tells the button what to do when press and when release ------------------------------------------------------------------------------------------ local button1Press = function( event ) --show animation when is pressed local buttonBye2 = graphics.newImageSheet( "images/button\_animation\_small.png", { width=108, height=108, numFrames=20, border = 0 } ) -- play 8 frames every 1000 ms --this bye\_Animation object is not local local bye\_Animation = display.newSprite( buttonBye2, { name="cat", start=11, count=20, time=1500, loopCount = 1 } ) --properties of the button. The size and the position. bye\_Animation.x = 250; bye\_Animation.y = 400 bye\_Animation:play() return true end -- When button is release it will go to scene1 local function button1Release( event ) if event.phase == "ended" then button1Press().isVisible = false storyboard.gotoScene( "scene1", "fade", 800 ) return true end end ------------------------------------------------------------------------------------------ -- This button has individual press and release functions ------------------------------------------------------------------------------------------ local buttonBye = widget.newButton { defaultFile = "images/bye.png", emboss = true, onPress = button1Press, onRelease = button1Release, }

Thanks for your time. 

Please ignore this post. I repost it on Storyboard. Thank you. 

I’ll lock this thread then.  Anyone wanting to respond:

http://forums.coronalabs.com/topic/36946-how-to-hide-a-widget-button-after-the-user-release-the-animated-button-in-corona-lab/

Please ignore this post. I repost it on Storyboard. Thank you. 

I’ll lock this thread then.  Anyone wanting to respond:

http://forums.coronalabs.com/topic/36946-how-to-hide-a-widget-button-after-the-user-release-the-animated-button-in-corona-lab/