Ohh, been searching now for a simple seconds-to-minutes converter. Serching on Google gave me results where peeps have 2+ function for counting minutes and seconds and so on... Well, giving this nut little time, i found a pretty neat way to calculate it all. var intervalCount:Number = 0; var counter:uint = setInterval(countSeconds, 1000); function countSeconds():void{ intervalCount++; var seconds:Number; var secStr:String; var minutes:Number = Math.floor(intervalCount/60); if(intervalCount >59){ seconds = intervalCount-(Math.floor(minutes)*60) }else{seconds = intervalCount; } if(seconds < 10){ secStr = String("0"+seconds); }else{ secStr = String(seconds); } trace( minutes+":"+ secStr ); // ex 674 seconds will be put out as 11:14 }
More
Support this project and others with 1-click micro-donations
