here is the start.lua code
[code]local storyboard = require “storyboard”
local scene = storyboard.newScene()
local function touchPlay( event )
if event.phase == “began” then
storyboard.gotoScene(“scene1”)
end
return true
end
local button1 = display.newRect( 0,0,50,50)
button1:setFillColor( 0, 180, 50)
button1:setReferencePoint(display.CenterReferencePoint)
button1.x = 200
button1.y = 200
button1:addEventListener( “touch”, touchPlay )
[/code]
and here is scene1.lua
[code]local storyboard = require “storyboard”
local scene = storyboard.newScene()
local start = storyboard.getPrevious()
local background = display.newRect( 0,0,360,640)
background:setFillColor( 150, 180, 0)
background:setReferencePoint(display.CenterReferencePoint)
background.x = 180
background.y = 320
local box1 = display.newRect( 0,0,50,50)
box1:setReferencePoint(display.CenterReferencePoint)
box1.x = 200
box1.y = 300
local box2 = display.newRect( 0,0,50,50)
box2:setReferencePoint(display.CenterReferencePoint)
box2.x = 100
box2.y = 300
local function touchPlay( event )
if event.phase == “began” then
storyboard.gotoScene(“start”)
end
return true
end
local back = display.newRect( 0,0,50,25)
back:setFillColor( 250, 0, 0)
back:setReferencePoint(display.CenterReferencePoint)
back.x = 60
back.y = 580
back:addEventListener( “touch”, touchPlay ) [import]uid: 218976 topic_id: 35950 reply_id: 143071[/import]