problem with transition

hi guys, I have a problem with a fade transition on my company image.

Infact, when I start my game, my Default.png image appear and do a fade transition for 5 seconds.
How can I delete this and set the transition without the fade transition? Thanks, here’s the code:

[code]
require(“director”)

local mainGroup = display.newGroup()

function main()

display.setStatusBar( display.HiddenStatusBar )

mainGroup:insert(director.directorView)

local storyboard = require “storyboard”

local compImage = display.newImage(“Default.png”, true)

transition.to(compImage, {time=5000, alpha = 0, onComplete = loadGame })

– director:changeScene(“titleScreen”)
director:changeScene(“titlescreen”)
end
main()
[/code] [import]uid: 129238 topic_id: 22261 reply_id: 322261[/import]

Take out the alpha part from your transition function (if you just want it to wait 5 seconds and not fade)

Or remove the transition thing and just change to the scene using a timer delay [import]uid: 84637 topic_id: 22261 reply_id: 88714[/import]

Thanks, but it still doesn’t work, can you please post the correct code?

here’s the code I’ve used:

[code]
require(“director”)

local mainGroup = display.newGroup()

function main()

display.setStatusBar( display.HiddenStatusBar )

mainGroup:insert(director.directorView)

local storyboard = require “storyboard”

local compImage = display.newImage(“Default.png”, true)

transition.to(compImage, {time=5000, onComplete = loadGame })

– director:changeScene(“titleScreen”)
director:changeScene(“titlescreen”)
end

main()
[/code] [import]uid: 129238 topic_id: 22261 reply_id: 88719[/import]

Remove line 21 and replace line 18 above with;

[lua]timer.performWithDelay(5000, function()director:changeScene(“titlescreen”)end, 1)[/lua]

Peach :slight_smile: [import]uid: 52491 topic_id: 22261 reply_id: 88810[/import]

Thanks, but once again, it doesn’t work.
I’ve used this code:

[code]
require(“director”)

local mainGroup = display.newGroup()

function main()

display.setStatusBar( display.HiddenStatusBar )

mainGroup:insert(director.directorView)

local storyboard = require “storyboard”

local compImage = display.newImage(“Default.png”, true)

timer.performWithDelay(3000, function()director:changeScene(“titlescreen”)end, 1)

end

main()
[/code] [import]uid: 129238 topic_id: 22261 reply_id: 88905[/import]

What is happening when you run that code?

You will need to remove compImage too. [import]uid: 52491 topic_id: 22261 reply_id: 88990[/import]

Thanks :slight_smile: , now I’ve used the following code:

require("director")  
   
local mainGroup = display.newGroup()  
   
function main()  
  
  
 display.setStatusBar( display.HiddenStatusBar )   
  
 mainGroup:insert(director.directorView)  
  
 local storyboard = require "storyboard"  
  
  
  
  
  
timer.performWithDelay(5000, function()director:changeScene("titlescreen")end, 1)  
  
  
 -- director:changeScene("titleScreen")  
  
end  
   
   
main()  

When I launch my application, it shows the image for a very short time, the the simulator’s screen become black and after 5 seconds it shows the “titlescreen” scene.
[import]uid: 129238 topic_id: 22261 reply_id: 89119[/import]

Thanks :slight_smile: , now I’ve used the following code:

require("director")  
   
local mainGroup = display.newGroup()  
   
function main()  
  
  
 display.setStatusBar( display.HiddenStatusBar )   
  
 mainGroup:insert(director.directorView)  
  
 local storyboard = require "storyboard"  
  
  
  
  
  
timer.performWithDelay(5000, function()director:changeScene("titlescreen")end, 1)  
  
  
 -- director:changeScene("titleScreen")  
  
end  
   
   
main()  

When I launch my application, it shows the image for a very short time, the the simulator’s screen become black and after 5 seconds it shows the “titlescreen” scene.
[import]uid: 129238 topic_id: 22261 reply_id: 89120[/import]