Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-12-2005, 09:09 AM   #1
padone
Registered User
 
Join Date: Dec 2004
Posts: 168
Default please help

please help

--------------------------------------------------------------------------------

i really need an experts help on this one... i know its possible and even have came up with a formula but i realy need an experts help to get it into actionscript and working. I have a mp3 player which loads external mp3's. it also has a slider bar so that you can select a certain time in the mp3.

now this all is fine but i would like to be able to get the time from your local machine and then do a mathmatic equation to determine what percentage of the mp3 should be playing for example...

if it was 14:22:33pm then it needs to do something like this


ActionScript Code:
now = new Date(); trace(now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds()); if (now.getHours() = 02 && now.getHours() =04 && now.getHours() =06 && now.getHours() =08 && now.getHours() =10 && now.getHours() =12 && now.getHours() =14 && now.getHours() =16 && now.getHours() =18 && now.getHours() =20 && now.getHours() =22 && now.getHours() =24) { trkperc = 0; } else if (now.getHours() = 01 && now.getHours() = 03 && now.getHours() = 05 && now.getHours() = 07 && now.getHours() = 09 && now.getHours() = 11 && now.getHours() = 13 && now.getHours() = 15 && now.getHours() = 17 && now.getHours() = 19 && now.getHours() = 21 && now.getHours() = 23) { trkperc = 50; } this._parent.track_play.onEnterFrame = function() {     perc = (trkperc)+(now.getMinutes/1.2)+(now.getSecondsx0.014);
thus playing the percent of the mp3 that it equals to in this case it would be

19%
padone is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:42 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.