problem with character controller? please help

Hi,

I am using character controller on a gameObject . the object is moving along a path and i want to provide a jump gesture on hitting a GUI texture . whenever the user touch the texture the game object will jump according to the touch time (for how long the user continue touching the texture) but applying gravity(through scripting) on the character controller , the jump gesture is not happening properly.
here is the code:

FOR GRAVITY:


private var controller : CharacterController; 
static var moveDirection = Vector3.zero;
var speed: float;

function Start()
{
	controller=GetComponent(CharacterController);
	
}


function FixedUpdate () {
	print(controller.isGrounded);
	
	if(controller.isGrounded)
	{
		
	moveDirection=Vector3.right;
		
		}
	
	else
	{
			
	moveDirection.y+=Physics.gravity.y*Time.deltaTime;	
	}

	moveDirection.y+=Physics.gravity.y*Time.deltaTime;	
	
	controller.Move(moveDirection*speed*Time.deltaTime);
}



for JUMP GESTURE :-
var jumpspeed : float ;
private var startTime: float;
private var endTime : float;
var go : GameObject;

var controller : CharacterController;

function Start()
{

	controller=go.GetComponent(CharacterController);
}

function Update () 

{		print(controller.isGrounded);
	
for(var touch : iPhoneTouch in iPhoneInput.touches)
	{
			if(touch.phase==iPhoneTouchPhase.Began  guiTexture.HitTest(touch.position))
			{
				
			 startTime=Time.time;
				
				
			}
			
			
		if((touch.phase==iPhoneTouchPhase.Moved  guiTexture.HitTest(touch.position))||(touch.phase==iPhoneTouchPhase.Stationary  guiTexture.HitTest(touch.position)))
		{	
			

			endTime= Time.time;		
			print(endTime-startTime);				
                    
                      if(endTime-startTime<0.5  controller.isGrounded)          /// this is not working 
                       {
			    gravity.moveDirection.y=jumpspeed+(endTime-startTime);
						
			}
		
		
		}
		
	
	if(touch.phase==iPhoneTouchPhase.Ended)
	{		
	}
	
	}
	
	
		
}

plzzzzz help

When you say the gesture isn’t happening properly, what exactly is going wrong? Does it just do nothing, work intermittently, react in the wrong way… ?