Replay btn

hi all, wat should i write for the as to recount the number of btn have been clicked??cos this is used in a replay btn. i have btn for user to click n count how many time the btn have been clicked n show out the match image, so now another btn (replay)to let the user to see again the image so what should i write in the replay btn’s as to let the count of the times of btn have been clicked start . cos what i done now it can’t start to count again it just plus the number i have clicked for the btn.

Let’s say if the image just only have 3 so tat when i finish clicked 3 times all the image ady showed n now i click the replay btn but wat i get is wrong cos in the output box it still counting the number i have been click for the btn so it show 4,5,… it can’t start count again.

anyone who know pls tell me .

thanks

in the main timeline set up a variable:
clicks=0;

then for the start button:
on(release){
_root.clicks+=1;
}

so the number of clicks is held in the “clicks” variable.

hi,thanks for reply but not so understand .

i have 2 types of btn : finger btn & number btn

at finger btn

 
on (rollOver) { 
   Mouse.hide(); 
   startDrag("track", true); 
} 
on (rollOut) { 
   Mouse.show(); 
   stopDrag(); 
   setProperty("track", _x, "850"); 
   setProperty("track", _y, "650"); 
} 
on (release) { 
   count++; 
   trace(count); 
   if (count == 0) { 
	  tellTarget ("1") { 
		 gotoAndPlay(1); 
	  } 
	   
   } 
   if (count == 1) { 
	  unloadMovie("1"); 
	  tellTarget ("1a") { 
		 gotoAndPlay(2); 
	  } 
	  b1.onRelease = function() { 
		 (count == 1); 
	  }; 
   } 
   if (count == 2) { 
	  gotoAndPlay(11); 
	  unloadMovie("1a"); 
	  tellTarget ("1b") { 
		 gotoAndPlay(2); 
	  } 
	  b2.onRelease = function() { 
		 (count == 2); 
	  }; 
   } 
   if (count == 3) { 
	  gotoAndStop(13); 
	  unloadMovie("1b"); 
	  tellTarget ("1c") { 
		 gotoAndPlay(2); 
	  } 
	  b3.onRelease = function() { 
		 (count == 3); 
	  }; 
   } 
} 
 

at number btn(here i put the last btn)

 on (release) { 
   gotoAndStop(13); 
   count++; 
   trace(count); 
   count == 3; 
   unloadMovie("1b"); 
   tellTarget ("1c") { 
	  gotoAndPlay(2); 
   } 
} 

now facing problem at the replay btn there tat i need it to go back to the first frame of the movieclip n it can let the count be recount again .

thanks

hi,i had try for the replay btn.
this is the code i put at the replay btn.

 
on (release) {
 
 unloadMovie("1c");
 count++;
 trace(count);
 
 if (count >= 3 ) {
	count = 0;
	}
 delete(count);
   gotoAndStop(1);
}
 

izzit the code i put correct.anyone who know pls reply me.
thanks