???Am I doing something wrong???

Try adding your code to the Storyboard Template. I see you have a “createScene” but no “enterScene” , “exitScene” etc…
Also you must remove the menu.lua scene when you go to the sp.lua scene or you will get error.

storyboard.removeScene( “menu” ) [import]uid: 75779 topic_id: 34070 reply_id: 135587[/import]

I have never HAD to do storyboard.removeScene()
[import]uid: 7911 topic_id: 34070 reply_id: 135590[/import]

http://www.coronaforums.org/Thread-Am-I-doing-something-wrong

Here you can see my error [import]uid: 203192 topic_id: 34070 reply_id: 135592[/import]

Remove self from functions
Should be

local function onButtonRelease( event ) [import]uid: 7911 topic_id: 34070 reply_id: 135597[/import]

— [import]uid: 75779 topic_id: 34070 reply_id: 135586[/import]

Try replacing menu.lua with this
** EDIT** forgot to end for loop

[code]
local storyboard = require “storyboard”
local scene = storyboard.newScene()
local widget = require “widget”
display.setStatusBar( display.HiddenStatusBar )

local button, background, ball, white, myText, myText2
local buttons ={ scenes ={ “sp”,“mp”,“pm”,“tbm”,“s”},
images={{“single player.png”,“single player2.png”},
{“multiplayer.png”,“multiplayer2.png”},
{“pro mode.png”,“pro mode2.png”},
{“two ball mode.png”,“two ball mode2.png”},
{“shop.png”,“shop2.png”}}}

local function onButtonRelease( event )
local id = event.target.id
storyboard.gotoScene( buttons[id] )
end

function scene:createScene( event )
local screenGroup = self.view

background = display.newImage ( “SkySoccer Grass.jpg” )

ball = display.newImage( “SkySoccer Ball.gif” )
ball.x = display.contentWidth / 2
screenGroup:insert( ball )

white = display.newImage( “witteachtergrond.png” )
white.x = display.contentWidth / 1.3
white.y = display.contentWidth / 25
screenGroup:insert( white )

myText = display.newText( “SkySoccer”, 0, 0, native.systemFont, 50 )
myText.x = display.contentCenterX
myText.y = display.contentWidth / 4.5
myText:setTextColor( 255, 0, 0 )
screenGroup:insert( myText )

myText2 = display.newText( “BroekieNetwork”, 0, 0, native.systemFont, 20 )
myText2.x = display.contentWidth / 1.3
myText2.y = display.contentWidth / 25
myText2:setTextColor( 0, 0, 255 )
screenGroup:insert( myText2 )

For a = 1, #buttons.scenes do
button = widget.newButton({
id = a,
left = 100,
top = 150,
default = buttons.images[a][1],
over = buttons.images[a][2],
onEvent = onButtonRelease
})
screenGroup:insert( button )
end
end

scene:addEventListener( “createScene”, scene )

return scene [import]uid: 7911 topic_id: 34070 reply_id: 135607[/import]

Everything is working fine now. I’ve discovered the problem! Yeah :slight_smile: [import]uid: 203192 topic_id: 34070 reply_id: 135611[/import]

That’s great. Please share what you did so if someone in the future has a similar problem it may help them if they read this. [import]uid: 7911 topic_id: 34070 reply_id: 135625[/import]

It had to do with the event.phase
event.phase isn’t needed at all [import]uid: 203192 topic_id: 34070 reply_id: 135650[/import]