How to calculate current time in mp3 player.

Hello friends
                   i am developing a small mp3 player in flex3.it is working fine but i need to find current time for its slider movement.i already calculated th length of song .but could not calculate the current time so that i can move pthumb of slider for my song.
i know its very simple but i m not getting any clue. so please help me out.
Thanks and regards
   vineet osho

mathsssss
http://www.mattlefevre.com/viewExample.php?tut=flex&proj=Basic%20MP3%20Player

Similar Messages

  • How to get current time and date??

    How to get current time and date from my PC time and date to the java application??
    i use java.util.* package but got error, that is:
    - java.util.* and java.sql.* class are match
    - abstract class cannot be instantiated
    so what can i do, pls guide...thanks...

    There is a method in the System class that will return the current system time. You could also instantiate a Date, Time, Timestamp, or Calendar object, all of which get created with the system time by default.
    Don't import *. Import the specific classes you need.
    Next time, post the actual text of the exceptions/compile errors. If you make people guess, most just won't bother.

  • How to calculate the time between start trigger,first scan and first A/D in DAQ

    Environment: Labview 6.1, N6052E DAQ board(max scan rate=333KHz, max channel rate=333KHz, settling time=3.5usec+1LSB)
    I am using external scan clock 10K scan/s collecting data on 16 AI channels, and external channel clock 200KHz.
    Could show me how to calculate the time betweent he start trigger, the first scan and the first A/D conversion?
    Thanks

    I read the one you give to me. still cannot work out. I am using Labview 6.1 DAQ vi, including AI config.vi. clock config.vi, AI control.vi, AI read.vi, working on colect data on 16 AI channels. So I belong to SCAN function and external scan and sampling timing, right?
    But it says the T1 and T2 are determined by external signals. How can I calculate that?
    T1=1/10KHz or T1=1/160Khz?
    T2=1/200KHz?
    Is the above correct?

  • How to calculate elapsed time(including time and date)?

    Hi all,
    I want to realize a function that can calculate the elapsed time which include time and date.Below is my thought:get the current time and date and store it to a .txt file then using the latest time and date subtract the time and date stored in the .txt file.how can realize it using the simplest way?I'm using LV7.1.

    Hi Idragon,
    you can do it like this.
    Mike
    Attachments:
    DateTime.PNG ‏12 KB

  • How to calculate SELECT time

    I want to know how to calculate time taken by SELECT query.
    For example: I am running one select statement in TOAD(oracle version 9i) which takes 40 seconds to run but in output window it display few records. It says "showing 1 of 500 records, more records exist". That table has total 20 million records.
    Now my question is: Did my SELECT query took 40 seconds? or it took 40 seconds to SELECT 500 records.
    If it took 40 seconds to SELECT 500 records then how to calculate total amount?
    Any help would be very much appreciated.

    Where I will find trace file?
    Toon Koppelaars wrote:
    What you could do is this.
    Say your current query is Q1. Then instead of executing Q1 in toad execute this in Toad:
    select count(*)
    from (Q1)
    /This is not totally safe, since the CBO could decide to alter the execution plan given that you now are not interested in any of the columns you had in the SELECT list of Q1.
    Other alternative is to use sqlplus.
    Set pages 0
    alter session set sql_trace=true;
    Run your Q1.
    alter session set sql_trace=false;
    Find the trace file, tkprof it, and see exactly what happened and how much time it took.
    I'm assuming that timed_statistics is set to true in your instance.Edited by: user639946 on Dec 3, 2010 1:00 PM

  • How do I build a simple MP3 player in Flash?

    I have recently redesigned my website and need to make
    several mp3 files available for playback. I'm a voiceover talent,
    and I need to have my demos readily available to those who visit my
    website to hear my work.
    I built the site using Dreamweaver (there's a little bit of
    Flash content there, but the site itself is not a Flash site). I
    know just anough about using Flash to be dangerous. :-) At the
    present time, I just embedded my 11 demos on a page, with each demo
    appearing TWICE -- once with the Windows Media Player embedded and
    once with the Quick Time player embedded -- to allow for maximum
    compatibility. But with 22 media players embedded in the page,
    well, you can pretty much guess what happens -- the page takes a
    freakin' eternity to load. No one's going to wait that long.
    In a previous version of my website, I had deployed a
    third-party app called Wimpy Button to achieve this functionality
    (www.wimpyplayer.com). Wimpy button is a very simple little Flash
    app that is designed to achieve precisely the functionality I need.
    But now when I launch the Wimpy Button Maker (the first step to
    creating the player), I get an error message that I think is
    telling me that either a .dll file required by the program is not
    there on my computer OR that a program I have since installed on my
    computer is either using or has overwritten that .dll file. Either
    way, the Wimpy solution is not working for me. So naturally, since
    Wimpy was doing all this in Flash, I figured the most logical place
    to turn was to Flash itself. I'm hoping to create my own little
    playback interface that I can place in multiple instances on the
    webpage, with each one set to trigger playback of a different .mp3
    file.
    Here's an example of something similar to what I'd like to
    end up with. Visit
    http://randybrown.voice123.com.
    There, you'll see a series of players down the right-hand side of
    the page, and each one triggers playback of a different .mp3 file.
    A closer look at the .swf file can be seen at
    http://voice123.com/swf/small_player.swf
    , so, as you can see, the graphic itself ain't that complicated. I
    know I can build the graphics file (or something similar) without
    too much difficulty.
    But getting it to have the functionality I need to deploy for
    this purpose is where I'm lost. I just don't have enough experience
    with Flash to have much of a clue.
    Can anyone walk me through the steps involved?
    Your thoughtful answer would be MUCH appreciated.
    Randy

    The best MP3 player I ever found for flash uses xspf
    playlists and xml - really cool and easy to use/implement. Check it
    at
    http://musicplayer.sourceforge.net/
    This player will go through a playlist you determine, or can jump
    from track to track. It takes a little bit of testing to set up,
    but is much simpler than writing your own player - and it's free.

  • How do I synch a nonapple mp3 player to my itunes music library

    I have a RCA lyra mp3 player and want to synch it to my itunes library to transfer purchased music. How do I do this? Do I have to transfer the music to windows media player library?

    You could try this:
    http://notpod.com/index.html
    It used to be iTunes agent and I haven't seen any reports of notpod as it is now called.

  • How to get current time

    Hi,
    I would like to know how to get the current time (07H25 for instance).
    Does someone know how to do it ?
    Thanks in advance, Fred.

    java.util.Date = new java.util.Date();
    The above code produces an object which contains a timestamp (date and time) for the instance in which it was created.
    To display it in any format you wish you would use the java.text.SimpleDateFormat class.

  • How to get current time in seconds

    Can someone please tell me how to get the current time in seconds. I am currently doing as follows but not sure if its correct or best way:
    Calendar cal = new GregorianCalendar();
    long currentTimeInSeconds = cal.getTimeInMillis()/1000;

    vik1491 wrote:
    How about this:
    Date date = new Date();
    Format formatter = new SimpleDateFormat("HH:mm:ss");
    String s = formatter.format(date);
    String patternStr = "\\:";
    String[] fields = s.split(patternStr);
    int secondsSinceMidnight= Integer.parseInt(fields[0]) * 3600 + Integer.parseInt(fields[1]) * 60 + Integer.parseInt(fields[2]);
    What about the day what you switch between standard time and daylight savings time?

  • How to calculate bandwidth through Multi-bitrate player

    Hello everyone
    I want to create multi-bitrate player to play VOD and Live stream.
    Now for switch between each video bitrate I have to find currently bandwidth between AMS server and client player.
    For get current bytes per second I use netstream info but this not stable to decision for switch between bitrates, also I use netConnection checkBandwidth for get the current bandwidth between client-server and sum this value with current bytes persecond for calculate current bandwidth between them but this values is not stable to decision.
    Please advise me to fix this problem.
    Thanks in advance.

    if the bandwidth is not stable between client and server then "it is not stable" not matter what tool you use to measure...What is your specific question?
    The server supplied checkbandwdth method is better way to find out bandwidth and is being used by other customers too to make a switch in case of MBR(Multi Bit Rate).

  • How to populate current time

    I have a form where current time needs to be populated. The way to form is to work is that the user tabs to time and the current time is populated , then they tab to the next time field and the new current time is populated there
    so on and so forth. How is this possible?

    Here's a JavaScript function that does the trick.
    function getCurrentTime() {
    var oNow = new Date();
    return oNow.getHours() + ":" + oNow.getMinutes() + ":" + oNow.getSeconds();
    Jared Langdon
    www.jlangdon.ca

  • Anyone know how to get current time using Java?

    Hi,
    do anyone know how to use system.currentTimeMillis() to get the current time?
    I know that system.currentTimeMillis() get the time between current time and midnight, January 1, 1970 UTC. but how to use it to get the current time format?
    Thank you very much.

    Hi,
    do anyone know how to use system.currentTimeMillis()
    to get the current time?
    I know that system.currentTimeMillis() get the time
    between current time and midnight, January 1, 1970
    UTC. but how to use it to get the current time format?
    Thank you very much.
    long timeInMillis = System.currentTimeMillis();
    Calendar c = Calendar.getInstance();
    c.setTime(timeInMillis);
    Date d = c.getTime();And format using SimpleDateFormat:
    SimpleDateFormat sdf = new SimpleDateFormat("dd-mm-yyyy HH:mm:ss");
    String formattedDateString = sdf.format(d);

  • How to calculate elapsed time based on user input

    I'm not sure what to do next in this program. Basically, I'm not sure exactly how to get the time to output accurately, as in what forumla I should be using.
    This is the question:
    What comes 13 hours after 4 o'clock? Create an ElaspedTimeCalculator application that prompts the user for a starting hour, whether it is am or pm, and the number of elapsed hours. The application then displays the time after that many hours have passed. Application output should look similar to:
    Enter the starting hour: 7
    Enter am or pm: pm
    Enter the number of elapsed hours: 10
    The time is: 5:00 amHere's the code I have so far:
    import java.util.Scanner;
    public class ElapsedTimeCalculator
         public static void main(String[] args)
              int starting_hour;
              int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
              String am_or_pm;
              int elapsed_hours;
              int elasped_minutes;
              int time_hours;
              int time_minutes;
              System.out.println("Welcome. This application will give you the time based on your input.");
              System.out.println(" ");
              Scanner input = new Scanner(System.in);
              System.out.print("Enter the starting hour: ");
              starting_hour = input.nextDouble();
              System.out.print("Enter the starting minutes: ");
              starting_minutes = input.nextDouble();
              System.out.print("Enter either 'am' or pm': ");
              am_or_pm = input.nextString();
              System.out.print("Enter the number of elapsed hours: ");
              elapsed_hours = input.nextDouble();
              input.close();
              time_hours =
              time_minutes = 
              if(am_or_pm = "am" || am_or_pm = "a.m." || am_or_pm = "AM" || am_or_pm = "A.M.")
                   System.out.println("The time is " + time_hours + ":" + time_minutes + "am");
              if(am_or_pm = "pm" || am_or_pm = "p.m." || am_or_pm = "PM" || am_or_pm = "P.M.")
                   System.out.println("The time is " + time_hours + ":" + time_minutes + "pm");
    }To calculate time_hours should I just calculate this by adding the elapsed hour to the starting hour? I doubt it will be accurate for all situations.
    Same for the time_minutes For example, if the starting minutes and the elapsed minutes were 50, it would be greater than 60. Also, not sure if it makes sense to separate hours and minutes like this, it's not required to in the question. I initally thought it would be easier to approach like this instead of allowing the user to input a double for the starting hour. ex. 5.7
    I get the feeling that this is extremely simple, but nonetheless, I'm stuck, so any help would be appreciated.

    Well thanks to both of you. I did a little reading up on the modulus operator and coupled it with some logic (although, truthfully, I'm not really using to there actually being an application for the remainder of a division operation, since it's never really used very much in any of my Math courses) and the hours portion works perfectly now:
    import java.util.Scanner;
    public class ElapsedTimeCalculator
         public static void main(String[] args)
              int starting_hour;
              //int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
              String am_or_pm;
              int elapsed_hours;
              //int elasped_minutes;
              System.out.println("Welcome. This application will give you the time based on your input.");
              System.out.println(" ");
              Scanner input = new Scanner(System.in);
              System.out.print("Enter the starting hour: ");
              starting_hour = input.nextInt();
              //System.out.print("Enter the starting minutes: ");
              //starting_minutes = input.nextInt();
              System.out.print("Enter either 'am' or pm': ");
              am_or_pm = input.next();
              System.out.print("Enter the number of elapsed hours: ");
              elapsed_hours = input.nextInt();
              input.close();
              int time_hours = 0;
              //int time_minutes;
              String meridien;
              if(am_or_pm.equals("am"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("am"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("AM"))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("A.M."))
                   time_hours = (starting_hour + elapsed_hours) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("pm"))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("p.m."))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("PM"))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              else if(am_or_pm.equals("P.M."))
                   time_hours = (starting_hour + elapsed_hours + 12) % 24;
                   //time_minutes = (starting_minutes + elapsed_minutes) % 60;
              if(time_hours < 12)
                   meridien = "A.M.";
                   System.out.println("The time is: " + time_hours + ":00 " + meridien);
              else if(time_hours > 12)
                   meridien = "P.M.";
                   System.out.println("The time is: " + time_hours + ":00 " + meridien);
    }Now the only thing is the minutes. My teacher did say she wants the user to have the option to input minutes also if he/she desires, so I do need it. However, the only problem is that if say the user inputs a "starting minute" of 14 for example, and 66 minutes elapsing, then (14 + 66) int/ 60 = 1r20 but using the modulus operator would only give me 20. So how will I be able to add any extra hours if it is necessary?

  • How to compare current time with any particular time?

    Hi All,
    Problem:
    I have a form which accept data from user but i want that user can enter data only before 4 in the evening after that no data will be accepted and user get any message. Now the problem is I want to compare the current time with 4 o clock or 16:00:00 but i dont know how to check whether the current time is greater or lesser than 4. Till now my code are like this: if(tt.equals("16:00:00")){}else{}
    where tt is current time. but this is not the feasible solution for my second clause.
    Any kind of help will greatly appreciate.
    Thanks

    One more thing:
    I find timestamp class quite helpful in my case but i
    dont know how to implement the before() method
    of this class.
    Any idea.* You wouldn't implement before(). You'd just use it. It's already implemented for you.
    * before() doesn't just compare the hour of the day. It compare two date & time objects to see which one is greater--that is, it effectively looks at all the fields, not just HOUR.
    * You don't need Timestamp if you're not dealing with a database.

  • How to calculate Execution Time

    Hi gurus,
    Can any one tell me how to calculate the Report Execution time in Seconds.
    We have one requirement.My manager told me track all the reports in Development server how much time those take to execute. and Compare those with Production server.
         I dont have an Idea how to calculate the Execution time in Seconds.
    Please guide me on this.
                    Thanks in Advance
    Thanks and Regards
    Siri...

    hi
    check se30
    enter the prog name and press execute.
    after your execution is over press back
    then press evaluate in the initial screen.
    you have the analysis
    in that you will get the time in microseconds and you can convert to sec
    REWARD IF HELPFUL
    PRASANTH

Maybe you are looking for