lua - Cannot 'gotoscene' with Corona SDK -



lua - Cannot 'gotoscene' with Corona SDK -

i have tried, tried , tried. cannot work.

all have main.lua button in it. want go about.lua.

my main.lua is:

local function about(event) storyboard.gotoscene( "about", {"fade", 500} ) homecoming true end local = widget.newbutton { top = 280, width = 320, height = 66, defaultfile = "about.png", overfile = "aboutdown.png", onrelease = }

and about.lua is:

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

please help!

if @ storyboard api see template code need utilize create scene, re-create template code about.lua , include actual code in createscene function, should work.

first step: create new about.lua using template code.

second step: add together code in createscene function this, background , widget forwards declarations before function calls

local widget = require ( "widget" ) local background -- called when scene's view not exist: function scene:createscene( event ) local grouping = self.view ----------------------------------------------------------------------------- -- create display objects , add together them 'group' here. -- illustration use-case: restore 'group' saved state. ----------------------------------------------------------------------------- background = display.newimage( "logo.png" ) background.x = display.contentcenterx background.y = display.contentcentery end

lua corona

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -