The Little Guy Posted February 16, 2008 Share Posted February 16, 2008 I need to convert seconds to percentage. If I have a video that is 219 seconds long, and the current position of the video is 45 seconds, how would I convert that to a percentage to show what percent of the movie has been played (0 - 100). This is for action script b.t.w. Link to comment https://forums.phpfreaks.com/topic/91429-convert-seconds-to-percentage/ Share on other sites More sharing options...
Daniel0 Posted February 16, 2008 Share Posted February 16, 2008 45/219 Link to comment https://forums.phpfreaks.com/topic/91429-convert-seconds-to-percentage/#findComment-468462 Share on other sites More sharing options...
effigy Posted February 16, 2008 Share Posted February 16, 2008 int ( ( 45 / 219 ) * 100 ) Link to comment https://forums.phpfreaks.com/topic/91429-convert-seconds-to-percentage/#findComment-468463 Share on other sites More sharing options...
The Little Guy Posted February 17, 2008 Author Share Posted February 17, 2008 Cool Thanks! Link to comment https://forums.phpfreaks.com/topic/91429-convert-seconds-to-percentage/#findComment-468591 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.