I make timer.performWithDelay to solve the question of black screen when i setup my app,
but what is the value that the delaytime ? i don’t konw.
help me or give me a demo
[import]uid: 29364 topic_id: 8771 reply_id: 308771[/import]
huh? [import]uid: 24 topic_id: 8771 reply_id: 32011[/import]
qianlima210210,
if you use a Default.png the user will have something to look at while your app loads.
I know what you mean about the black screen of death though. In my current app, we do some upfront network chatter and it seems to take a long time to load. We pushed that off deeper into the screen flow (using some misdirection in director.lua). Can you take the initial load off the launch sequence?
[import]uid: 37036 topic_id: 8771 reply_id: 32018[/import]
If I recall correctly we’re talking about an Android app, not iOS, so Default.png wont work.
Here is an example of the timer, I think that’s what you were after
[lua]local mysplash = display.newImage (“mysplash.png”)
function removesplash (event)
mysplash:removeSelf()
end
timer.performWithDelay(3000, removesplash, 1)[/lua]
mysplash = your splash screen (obviously use your own image name)
3000 = 3 seconds
removesplash = the function to remove your image
1 = perform the action once
The above would show your splash screen for 3 seconds then remove it.
If you are using director, simply change scene after three seconds instead.
Hope that helps
Peach [import]uid: 10144 topic_id: 8771 reply_id: 32133[/import]