Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

convert seconds to standard timer string ?!

$
0
0

hey  i found this to convert second to standard time (00:00)

 

but they doesnt work

 

http://snipplr.com/view/33913/

 

http://snipplr.com/view/65185/milliseconds-to-mmssmmmm/

 

can you help me please ?

its on click event

[code]

function convertTime(secs:Number):String

{

    var h:Number=Math.floor(secs/3600);

    var m:Number=Math.floor((secs%3600)/60);

    var s:Number=Math.floor((secs%3600)%60);

    return(h==0?"":(h<10?"0"+h.toString()+":":h.toString()+":"))+(m<10?"0"+m.toString():m.toS tring())+":"+(s<10?"0"+s.toString():s.toString());

}

var counter = sym.getPosition(); // its return 5000

var mytime=toTimeCode(counter);

sym.$("Text").html(mytime);

[/code]


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>