Im trying to figure out how to use this in storyboard, but im getting errors with this working on my iPhone. the screen is stuck and nothing happens it doesn’t move into the next screen.
anyone can help me out???
[code]
– AD Screen inner-active.com
local storyboard = require( “storyboard” )
local scene = storyboard.newScene()
– BEGINNING OF YOUR IMPLEMENTATION
– local background
local ads = require “ads”
– Called when the scene’s view does not exist:
function scene:createScene( event )
local screenGroup = self.view
– Example for inneractive:
ads.init( “inneractive”, “APPID” )
– iPhone, iPod touch, iPad, android etc
–ads.show( “banner”, { x=0, y=0, interval=5 } )
ads.show( “fullscreen”, { x=0, y=0, interval=5 } )
–ads.show( “text”, { x=0, y=100, interval=5 } )
–[[background = display.newImageRect( “assets/graphics/title.png”, 480, 320 )
background:setReferencePoint( display.TopLeftReferencePoint )
background.x = 0; background.y = 0
screenGroup:insert( background )
–]]
print( “\nTitle: createScene event”)
end
– Called immediately after scene has moved onscreen:
function scene:enterScene( event )
local group = self.view
print( “Title: enterScene event” )
local function gotoMainMenu()
storyboard.gotoScene( “mainmenu”, “fade”, 500 )
end
– To wait 5 seconds before switching scenes,
timer.performWithDelay(5000, gotoMainMenu)
local lastScene = storyboard.getPrevious()
print( “last scene was:”, lastScene ) – output: last scene name
end
– Called when scene is about to move offscreen:
function scene:exitScene( event )
local group = self.view
– hide all ads
ads.hide()
print( “Title: exitScene event” )
end
– Called prior to the removal of scene’s “view” (display group)
function scene:destroyScene( event )
local group = self.view
print( “((destroying Title’s view))” )
end
– END OF YOUR IMPLEMENTATION
– “createScene” event is dispatched if scene’s view does not exist
scene:addEventListener( “createScene”, scene )
– “enterScene” event is dispatched whenever scene transition has finished
scene:addEventListener( “enterScene”, scene )
– “exitScene” event is dispatched before next scene’s transition begins
scene:addEventListener( “exitScene”, scene )
– “destroyScene” event is dispatched before view is unloaded, which can be
– automatically unloaded in low memory situations, or explicitly via a call to
– storyboard.purgeScene() or storyboard.removeScene().
scene:addEventListener( “destroyScene”, scene )
return scene
[/code] [import]uid: 17701 topic_id: 33167 reply_id: 333167[/import]