It didn’t work either … Here is the credit.lua code:
local composer = require(“composer”)
local widget = require( “widget” )
display.setStatusBar(display.HiddenStatusBar)
local grp= {}
grp.main = display.newGroup()
grp.screen =display.newGroup()
local scene = composer.newScene()
local v = {}
v.centerX = display.contentCenterX
v.centerY = display.contentCenterY
local gfx = {}
composer.removeScene(“mainscreen”)
local function back(event)
local obj2 = event.target
if event.phase ==“ended”
then
obj2:removeSelf()
obj2=nil
composer.gotoScene( “mainscreen” )
end
end
local bg, textdisp, textdispName,textdispName2, img
function scene:create(event)
grp.main = self.view
bg= display.newImageRect(grp.screen, “bgjpg.jpg”,1600, 1000)
bg.x=v.centerX
bg.y=v.centerY
bg.alpha=0.5
textdisp=display.newText( grp.screen, “THANKS TO :\n\n”, 0, 0, “native.systemFontBold”, 60 )
textdisp.x=v.centerX
textdisp.y=v.centery-150
textdispName = display.newText( grp.screen, “- (Name)\n\n\n”, 0, 0, “native.systemFontBold”, 40 )
textdispName.x=v.centerX
textdispName.y=v.centerY-250
textdispName2 = display.newText(grp.screen, "Game created by : ", 0, 0, “native.systemFontBold”, 60 )
textdispName2.x=v.centerX
img=display.newImage(grp.screen,“logopng.png”)
img.x=v.centerX
img.y=v.centerY
gfx.img=img
button3 = widget.newButton
{
label = “button”,
onEvent = back,
emboss = true,
shape=“roundedRect”,
fontSize=25,
cornerRadius = 20,
fillColor = { default={0,0.95,0,0.6}, over={ 0.5,0.22,0,0.7 } },
strokeColor = { default={ 0.5,0.22,0,1 }, over={ 0,1,0,1 } },
strokeWidth =3,
labelColor = { default={ 1, 1, 1,1 }, over={ 0, 1, 0, 1 } },
}
button3.x=v.centerX
button3.y = v.centerY + 185
button3:setLabel( “<-- Back” )
button3:scale(2,2)
grp.main:insert(grp.screen)
end
function scene:show( event )
grp.main = self.view
local phase = event.phase
if phase==“did”
then
trans=transition.blink (gfx.img, {time=1000})
end
end
function scene:hide(event)
grp.main = self.view
local phase=event.phase
if phase==“will”
then
transition.cancel(trans)
end
end
function scene:destroy( event )
grp.main = self.view
print( “((Destroyed credits view))” )
end
scene:addEventListener( “create”, scene )
scene:addEventListener( “show”, scene )
scene:addEventListener( “hide”, scene )
scene:addEventListener( “destroy”, scene )
return scene
What I think is the error comes on entering the scene “credits.lua”.
Please help.