How do I make a button appear by pushing a button?

So if have a start button, how do I make it that when I push the start button a button that says stop appears.

Using the widget library  

local widget = require( "widget" ) -- Function to handle button events local function handleButtonEvent( event ) if ( "ended" == event.phase ) then print( "Button was pressed and released" ) end end local button1 = widget.newButton( { width = 240, height = 120, defaultFile = "buttonDefault.png", overFile = "buttonOver.png", label = "button", onEvent = handleButtonEvent } ) -- Center the button button1.x = display.contentCenterX button1.y = display.contentCenterY -- Change the button's label text button1:setLabel( "2-Image" ) sceneGroup:insert(example)

what about you just change the name to stop

local widget = require( "widget" ) -- Function to handle button events local function handleButtonEvent( event ) if ( "ended" == event.phase and button1:getLabel() == "2-Image" ) then button1:setLabel( "stop" ) print( "Button was pressed and released" ) end end local button1 = widget.newButton( { width = 240, height = 120, defaultFile = "buttonDefault.png", overFile = "buttonOver.png", label = "button", onEvent = handleButtonEvent } ) -- Center the button button1.x = display.contentCenterX button1.y = display.contentCenterY -- Change the button's label text button1:setLabel( "2-Image" ) sceneGroup:insert(example)

How do I change the dimensions, function, and image of the second button? As I want them to look different.

Cheers

Zane

what about you just change the name to stop

local widget = require( "widget" ) -- Function to handle button events local function handleButtonEvent( event ) if ( "ended" == event.phase and button1:getLabel() == "2-Image" ) then button1:setLabel( "stop" ) print( "Button was pressed and released" ) end end local button1 = widget.newButton( { width = 240, height = 120, defaultFile = "buttonDefault.png", overFile = "buttonOver.png", label = "button", onEvent = handleButtonEvent } ) -- Center the button button1.x = display.contentCenterX button1.y = display.contentCenterY -- Change the button's label text button1:setLabel( "2-Image" ) sceneGroup:insert(example)

How do I change the dimensions, function, and image of the second button? As I want them to look different.

Cheers

Zane