touch to loadlevel

I have a GUIText- "play" on a scene called Title. When play is touched, I want the application to load the title scene. The following is the code that I have written and attached to the GUIText, and isn't working:

function Update(){ 

var count = iPhoneInput.touchCount; 
for (var i: int = 0; i < count; i++){ 
var touch : iPhoneTouch = iPhoneInput.GetTouch(i); 

if (GUIText.HitTest( touch.position )){ 
Application.LoadLevel("Crush") 
} 
} 
} 

Any ideas (please)?

Well, without more info the first thing that comes to mind is that Update() is called each frame, and you might be calling the Application.LoadLevel("Crush") several times, instead of only once. Not sure about this, but it's worth checking out just in case.

Try adding some variable to see if it was already hit, like:

var bWasTextHit: boolean = false;

if (!bWasTextHit && GUIText.HitTest( touch.position ))
{ 
    bWasTextHit = true;
    Application.LoadLevel("Crush") 
}

Not to mention you might also be hitting it with more than one finger :)

I can confirm that I've had issues with Application.LoadLevels being triggered in Update loops without a toggling boolean.