Return to Snippet

Revision: 45877
at May 10, 2011 17:26 by ions


Initial Code
function timeCode(theTime:uint):String 
{
	var theMin:uint = Math.floor(theTime / 60);
	var theSec:uint = theTime % 60;
	var tcString:String = "";
			
	if (theMin < 10) {
		tcString += "0";
	}
	if (theMin >= 1) {
		tcString += theMin.toString();
	}else {
		tcString += "0";
	}
			
	tcString += ":";
	if (theSec < 10) {
		tcString += "0";
		tcString += theSec.toString();
	}else {
		tcString += theSec.toString();
	}
			
	return tcString;
}

Initial URL


Initial Description
Utile pour formater l'affichage d'un compteur de temps (player video, player mp3, …)

Initial Title
Affichage de temps

Initial Tags
actionscript

Initial Language
ActionScript 3