How to make a simple splash screen

Hello I have been having some trouble trying to create a simple splash screen. What I want to do is when the character goes to the final teleporter it fades to a splash screen that says thank you for playing etc, then after a few seconds goes back to the main screen. I have looked around and unity doesnt identify Fade for some reason :S

Here is my code so far

  function OnTriggerEnter(other : Collider){
var startTime = Time.time;
var fadeDuration = 2.0;
var i = 0;

while (i <= 1) {
    i = (Time.time - startTime) / fadeDuration;
    guiTexture.color = new Color(1,1,1,i);
    yield;
}
     Application.LoadLevel("0");
    }

I have tried using things like `yield Fade.use.Alpha(guiTexture, 1.0, 0.0, 1.5);` but I donnot why it doesnt work, I'm still learning.

Thanks for the help

[EDIT]

I have updated it so that the Splash screen goes onto another scene however as the scene fades into the other scene, the fade on the other scene loads up automatically, so you dont see the splash screen long enough. Here is the script from the teleporter.

 var teleporterSound : AudioClip;

//when player hits the object the game ends
function OnTriggerEnter(other : Collider){
    audio.clip = teleporterSound;
        audio.Play();

//fade to splash screen
LevelLoadFade.FadeAndLoadLevel(3, Color.white, 1.0);

    }

And here is the script from the splash screen- ideally id like it to fade out onto the main menu.

//fade to splash screen
LevelLoadFade.FadeAndLoadLevel(0, Color.white, 2);

You could use something like this to fade a guiTexture in over a period of 2 seconds, then load a different scene:

var startTime = Time.time;
var fadeDuration = 2.0;
var i = 0;

while (i <= 1) {
    i = (Time.time - startTime) / fadeDuration;
    guiTexture.color = new Color(1,1,1,i);
    yield;
}

Application.LoadLevel(0);

Solved it.

I took a different root altogther, I made new scene with a plain with the splash screen on, then reimported a button from my game over screen added it, so now when I collide it goes to a new scene with splash screen, and button to link back to main menu. I couldnt get the other methods to work, but this works fine, as the scene fades in, then the button fades to the main menu.

Thanks for everyone who tried tho :D

If you are still having a hard time working a good looking splash screen, check it out my Asset Store package.

You can get a professional looking splash screen in less than 3 minutes using the build in examples

Heres The Most Simpilest Code: (Add To AppDelgate.m)

#import "AppDelegate.h"

@implementation AppDelegate

@synthesize window; @synthesize tabBarController;

  • (void)applicationDidFinishLaunching:(UIApplication *)application {

    sleep(4);

...........

@end

Add the image and name it : Default.png The Size Of The Image Has To Be : 320 X 480

Check here: http://techmon.in/u3d/2playertictactoe/