Director class : splash screen

Just wondering if anyone has implemented a splash screen with the director class?

It would seem the best place to do this would be in the main.lua by loading the default.png then fading it out but then it fades out to black. Doing it in the main menu screen isn’t good either as it will do it every time you return to the menu. [import]uid: 9371 topic_id: 4553 reply_id: 304553[/import]

Off the top of my head, I was thinking of doing this:

Create a splash.lua file, and load splash.lua from the main.lua file

  
local myLogo = display.newImage("logo.png")  
myLogo.x = display.contentHeight/2  
myLogo.y = display.contentWidth/2  
myLogo.alpha = 0  
  
transition.to( myLogo, {time=500, delay=500, alpha=1})  
transition.to( myLogo, {time=500, delay=3500, alpha=0})  
  
local changeScene = function()  
 director:changeScene("mainMenu", "fade")  
end  
  
timer.performWithDelay(4000, changeScene)  
  

That is off the top of my head so it can probably be fine tuned to be more efficient, but that is the general idea behind it. If you check out Ghosts vs. Monsters or Martian Control (in the code exchage) you will see that John Beebe has used a method like this and it looks real nice. This is where I got the idea from, just dont remember the exact code and im on my iphone now. Check it out!
[import]uid: 9968 topic_id: 4553 reply_id: 14439[/import]

Trouble is it doesn’t fades in from black as the unload/clean functionhas to clear the previous scenes image [import]uid: 9371 topic_id: 4553 reply_id: 14452[/import]

Guys, please write your questions at Director’s sub-forum. I don’t have too much time to answer and I really didn’t see most of the topics created for Director. I’m sorry for that and I will appreciate if you all could go to this link:

http://developer.anscamobile.com/forums/director-class [import]uid: 8556 topic_id: 4553 reply_id: 18693[/import]