Hello!
Here´s the deal, I´am trying to do an intro for my app by first loading my intro.lua with 2 timers in it.
1 is for the intro picture to pop up from the black screen, 1 is ofc for changeing to meny.
The “simple” function works with the “isvisible” but when i try the gotoscene it just does not work.
It says something like "bad argument… insert… proxy expected, got nil.
It only works if i do a :
local function forrasidan( self, event )
if event.phase == “ended” then
storyboard.gotoScene( “bild2”, “fade”, 500)
return true
end
end
then it works. Why?
This is how it looks like.
[code] local storyboard = require( “storyboard” )
local scene = storyboard.newScene()
--------------FUNKTIONER---------------------------------------
local function bild (event)
intro.isVisible=true
audio.play(plingSnd)
return true
end
local function bytameny (event)
storyboard.gotoScene( “menu”, “fade”, 500)
return true
end
– Called when the scene’s view does not exist:
function scene:createScene( event )
local Group0 = self.view
plingSnd = audio.loadSound(“pling.mp3”)
intro = display.newImage(“intro.jpg”)
Group0:insert (intro)
intro.isVisible=false
print( “\n1: createScene event”)
end
– Called immediately after scene has moved onscreen:
function scene:enterScene( event )
local Group0 = self.view
local t1=timer.performWithDelay(1500,bild,1)
local t2=timer.performWithDelay(4400,bytameny,1)
print( “1: enterScene event” )
end
[code]
Thank you lads! [import]uid: 197493 topic_id: 34655 reply_id: 334655[/import]