Hello everybody,
I can go from the main.lua file to the sp.lua file.
I can also go from the sp.lua file to the spstart.lua file.
BUT I can’t go from the sp.lua file back to the main.lua file
Can anyone help me please?
main.lua:
[code]local storyboard = require( “storyboard” )
local scene = storyboard.newScene()
local widget = require “widget”
display.setStatusBar( display.HiddenStatusBar )
local background = display.newImage ( “SkySoccer Grass.jpg” )
local ball = display.newImage( “SkySoccer Ball.gif” )
ball.x = display.contentWidth / 2
local white = display.newImage( “witteachtergrond.png” )
white.x = display.contentWidth / 1.3
white.y = display.contentWidth / 25
local myText = display.newText( “SkySoccer”, 0, 0, native.systemFont, 50 )
myText.x = display.contentCenterX
myText.y = display.contentWidth / 4.5
myText:setTextColor( 255, 0, 0 )
local myText = display.newText( “BroekieNetwork”, 0, 0, native.systemFont, 20 )
myText.x = display.contentWidth / 1.3
myText.y = display.contentWidth / 25
myText:setTextColor( 0, 0, 255 )
local function onButtonRelease( event )
local btn = event.target
storyboard.gotoScene( “sp” )
end
local button = widget.newButton{
id = “singleplayer”,
default = “single player.png”,
over = “single player2.png”,
onRelease = onButtonRelease
}
button.x = display.contentCenterX
button.y = display.contentWidth / 2
local function onButtonRelease2( event )
local btn = event.target
storyboard.gotoScene( “mp”, “fade”, 500 )
end
local button = widget.newButton{
id = “multiplayer”,
default = “multiplayer.png”,
over = “multiplayer2.png”,
onRelease = onButtonRelease2
}
button.x = display.contentCenterX
button.y = display.contentWidth / 1.4
local function onButtonRelease3( event )
local btn = event.target
storyboard.gotoScene( “pm”, “fade”, 500 )
end
local button = widget.newButton{
id = “promode”,
default = “pro mode.png”,
over = “pro mode2.png”,
onRelease = onButtonRelease3
}
button.x = display.contentCenterX
button.y = display.contentWidth / 1.07
local function onButtonRelease4( event )
local btn = event.target
storyboard.gotoScene( “tbm”, “fade”, 500 )
end
local button = widget.newButton{
id = “twoballsmode”,
default = “two balls mode.png”,
over = “two balls mode2.png”,
onRelease = onButtonRelease4
}
button.x = display.contentCenterX
button.y = display.contentWidth / 0.87
local function onButtonRelease5( event )
local btn = event.target
storyboard.gotoScene( “s”, “fade”, 500 )
end
local button = widget.newButton{
id = “shop”,
default = “shop.png”,
over = “shop2.png”,
onRelease = onButtonRelease5
}
button.x = display.contentCenterX
button.y = display.contentWidth / 0.73[/code]
sp.lua:
[code]local storyboard = require( “storyboard” )
local scene = storyboard.newScene()
local widget = require “widget”
display.setStatusBar( display.HiddenStatusBar )
local background = display.newImage ( “uitlegbg.jpg” )
local myText = display.newText( “Single Player”, 0, 0, native.systemFont, 40 )
myText.x = display.contentCenterX
myText.y = display.contentWidth / 10
myText:setTextColor( 255, 0, 0 )
local myText = display.newRetinaText( “You have one ball and you have to keep the ball high as many times as you can”, 30, 70, 280, 220, native.systemFont, 22 )
myText:setTextColor( 255, 0, 0 )
local road = display.newImage( “roadklein.jpg” )
road.x = display.contentWidth / 5.5
road.y = display.contentWidth / 1.5
local beach = display.newImage( “beachklein.jpg” )
beach.x = display.contentWidth / 1.97
beach.y = display.contentWidth / 1.5
local house = display.newImage( “houseklein.jpg” )
house.x = display.contentWidth / 1.2
house.y = display.contentWidth / 1.5
local park = display.newImage( “parkklein.jpg” )
park.x = display.contentWidth / 3.3
park.y = display.contentWidth / 0.95
local stadium = display.newImage( “stadiumklein.jpg” )
stadium.x = display.contentWidth / 1.4
stadium.y = display.contentWidth / 0.95
local function onButtonRelease( event )
local btn = event.target
storyboard.gotoScene( “main” )
end
local button = widget.newButton{
id = “back”,
default = “back.png”,
over = “back2.png”,
onRelease = onButtonRelease
}
button.x = display.contentWidth / 4.2
button.y = display.contentWidth / 0.73
local function onButtonRelease2( event )
local btn = event.target
storyboard.gotoScene( “spstart” )
end
local button = widget.newButton{
id = “start”,
default = “start.png”,
over = “start2.png”,
onRelease = onButtonRelease2
}
button.x = display.contentWidth / 1.3
button.y = display.contentWidth / 0.73[/code] [import]uid: 203192 topic_id: 34027 reply_id: 334027[/import]