local storyboard = require( "storyboard" )
local scene = storyboard.newScene()
-- this will only happen once when the scene is first required.
print ("in load splashscreen file")
function scene:createScene( event )
local group = self.view
display.setStatusBar(display.HiddenStatusBar)
print ("in load splashscreen file")
--BACKGROUND IMAGES
local background = display.newImage("gnomiessplashbg.png")
group:insert(background) -- must be in the scene's view ("group") to be managed.
background.x = display.contentWidth / 2
background.y = display.contentHeight / 2
--media.playSound( "gnomiesmusic.mp3", true )
local backgroundbg2 = display.newImage("gnomiessplashbg2.png")
group:insert(backgroundbg2)
backgroundbg2.x = display.contentWidth / 2
backgroundbg2.y = display.contentHeight / 2
--BACKGROUND IMAGES END
--BUTTONS
local worlds = display.newImage("gnomiesPlaybutton.png" )
group:insert(worlds)
worlds.x = display.contentWidth / 1.9
worlds.y = display.contentHeight / 2.1
--END BUTTONS
local function touched (event)
if ("ended" == event.phase) then
storyboard:gotoScene( "worlds", "fade" )
end
end
worlds:addEventListener ("touch", touched)
end
function scene:enterScene( event )
local group = self.view
end
function scene:exitScene( event )
local group = self.view
end
function scene:destroyScene( event )
local group = self.view
end
scene:addEventListener( "createScene", scene )
scene:addEventListener( "enterScene", scene )
scene:addEventListener( "exitScene", scene )
scene:addEventListener( "destroyScene", scene )
return scene
changeScene() is a director method. storyboard uses gotoScene() [import]uid: 199310 topic_id: 34149 reply_id: 136934[/import]