Director 1.3 won't load screen

Hi,

I have a weird problem with director 1.3

All of the screens are loading perfectly, except for this one:

It’s shows a Loading picture, and tries to change the screen, thats all.

It doesn’t give any errors, and in the terminal ‘Before load’ and ‘after load’ are visible, so the changeScene command is executed.

All i see is the Loading screen.

UPDATE: When i add a button to it, and click that’it loads the screen without problems.

[code]
module(…, package.seeall)

new = function ( )


– Params


– Groups

local levelGroup = display.newGroup()


– Your code here

local background = display.newImage( “loading.png” )
levelGroup:insert( background )

print (“Before load”)
director:changeScene( “menu”, “moveFromLeft” )
print (“After load”)

– MUST return a display.newGroup()

return levelGroup

end
[/code] [import]uid: 50459 topic_id: 12706 reply_id: 312706[/import]

with just that given piece of information, does a file called menu.lua exist? and does it also create the mainGroup and add display elements in it?

cheers,

?:slight_smile:

[import]uid: 3826 topic_id: 12706 reply_id: 46554[/import]

Maybe its just happening too fast? Can you try it with putting in a slight delay before calling changeScene?

Try swapping out lines 22-24 with this for a half second delay…

 local function listener( event )  
 print ("Before load")  
 director:changeScene( "menu", "moveFromLeft" )  
 print ("After load")  
 end  
   
 timer.performWithDelay(500, listener,1)  

–Croisened [import]uid: 48203 topic_id: 12706 reply_id: 46570[/import]

Thanks Croisened, that did the trick!
[import]uid: 50459 topic_id: 12706 reply_id: 46648[/import]