New to Storyboard API

Hello! I am new to Storyboard API and got a problem. I want to create a button and go to the next scene when that button is touched.

[lua]

– scene1.lua

local storyboard = require( “storyboard” )
local scene = storyboard.newScene()
local background, cherries

local function onSceneTouch( self, event )
if event.phase == “began” then
storyboard.gotoScene( “scene2”, “slideLeft”, 800 )
return true
end
end

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

background = display.newImage( “background.png” )
screenGroup:insert( background )

cherries = display.newImage(“cherries.png”)
cherries.x = display.contentWidth / 1.6
cherries.y = display.contentHeight / 2
screenGroup:insert( cherries )

cherries.touch = onSceneTouch

print( “\n1: createScene event”)
end
function scene:enterScene( event )

print( “1: enterScene event” )
end
function scene:exitScene( event )

print( “1: exitScene event” )
cherries:removeEventListener( “touch”, cherries )
end

function scene:destroyScene( event )

print( “((destroying scene 1’s view))” )
end

scene:addEventListener( “createScene”, scene )
scene:addEventListener( “enterScene”, scene )
scene:addEventListener( “exitScene”, scene )
scene:addEventListener( “destroyScene”, scene )
return scene
[/lua]

It doesn’t seem to work properly.
Thank you. [import]uid: 208318 topic_id: 36233 reply_id: 336233[/import]

I don’t see where you’re adding a touch listener to cherries in createScene() [import]uid: 199310 topic_id: 36233 reply_id: 143990[/import]

Thank you for your response. I was finally able to change the screen.

Again, thank you for your help. [import]uid: 208318 topic_id: 36233 reply_id: 144001[/import]

I don’t see where you’re adding a touch listener to cherries in createScene() [import]uid: 199310 topic_id: 36233 reply_id: 143990[/import]

Thank you for your response. I was finally able to change the screen.

Again, thank you for your help. [import]uid: 208318 topic_id: 36233 reply_id: 144001[/import]

I don’t see where you’re adding a touch listener to cherries in createScene() [import]uid: 199310 topic_id: 36233 reply_id: 143990[/import]

Thank you for your response. I was finally able to change the screen.

Again, thank you for your help. [import]uid: 208318 topic_id: 36233 reply_id: 144001[/import]

I don’t see where you’re adding a touch listener to cherries in createScene() [import]uid: 199310 topic_id: 36233 reply_id: 143990[/import]

Thank you for your response. I was finally able to change the screen.

Again, thank you for your help. [import]uid: 208318 topic_id: 36233 reply_id: 144001[/import]