Cannot 'gotoscene'!

I am new to Corona, and I am having some trouble with ‘gotoscene’

What I want is for a a button in ‘main.lua’ to make ‘about.lua’ appear.

-- main.lua local widget = require( "widget" ) -- get's widgets (for buttons) local storyboard = require ( "storyboard" ) -- get's stuff for screen changing local scene = storyboard.newScene( "about" ) -- ===============================DISPLAY==========================================-- local background = display.newImage( "mainscreen.png" ) background.x = display.contentCenterX background.y = display.contentCenterY display.setStatusBar(display.HiddenStatusBar) -- ================================Buttons/Places to go to ========================-- local logo = display.newImage( "logo.png", 160, 66 ) local About = display.newImage( "about.png", 160, 300 ) local function playgame( event ) local phase = phase if "ended" == phase then print( "You pressed the button" ) end end local play = widget.newButton { top = 160, width = 320, height = 66, defaultFile = "play.png", overFile = "playdown.png", onRelease = playgame, } local function about(event) storyboard.gotoScene( "about", {"Fade", 500} ) return true end local about = widget.newButton { top = 280, width = 320, height = 66, defaultFile = "about.png", overFile = "aboutdown.png", onRelease = about }

When is is all done, I will make it neat. I space things out to concentrate on them. Here is the about.lua:

-- about.lua local storyboard = require ( "storyboard" ) local scene = storyboard.newScene() local widget = require ( "widget" ) local background = display.newImage( "logo.png" ) background.x = display.contentCenterX background.y = display.contentCenterY

main.lua should not be a scene.  It should simply call the .gotoScene() call to your first scene automatically.  Your first scene can then have a button on it to move forward.  If you want the button in main.lua, don’t make main.lua a scene, just create the button and have its handler do the gotoScene() like you’re doing, but you will have to manually remove the widget.newButton since it’s not going to be part of a scene.

main.lua should not be a scene.  It should simply call the .gotoScene() call to your first scene automatically.  Your first scene can then have a button on it to move forward.  If you want the button in main.lua, don’t make main.lua a scene, just create the button and have its handler do the gotoScene() like you’re doing, but you will have to manually remove the widget.newButton since it’s not going to be part of a scene.