Get the flv total time in AS2

Hi.
I am loading a flv video in AS2:
var conexion:NetConnection = new NetConnection();
conexion.connect(null);
var stream:NetStream = new NetStream(conexion);
mi_video.attachVideo(stream);
stream.play("motto.flv");
this.onEnterFrame = function() {
    if (stream.time>0) {
        var integer:String = String((stream.time*.0166) >> 0);
        var decimal:String = String((stream.time%60) >> 0);
        timer_txt.text = ((integer.length<2) ? "0"+integer : integer)+":"+((decimal.length<2) ? "0"+decimal : decimal)
    } else {
        timer_txt.text = String("00:00");
It wokrs very good, In this line, I get de current time of the flv:
timer_txt.text = ((integer.length<2) ? "0"+integer : integer)+":"+((decimal.length<2) ? "0"+decimal : decimal)
An I need to display the total time too..
By the way, I am not using the any flv component, I need to play the video in a custom player....
Thanks

I answer myself:
stream.onMetaData = function(info:Object) {
        var totalInteger:String = String((info.duration*.0166) >> 0);
        var totalDecimal:String = String((info.duration%60) >> 0);
        total = ((totalInteger.length<2) ? "0"+totalInteger : totalInteger)+":"+((totalDecimal.length<2) ? "0"+totalDecimal : totalDecimal);

Similar Messages

  • I am having troubles, when I open LR I get a message that there is an error and it will try to fix the error next time it opens, but I get the error next time it opens, and this is going on and on where I can not use LR, any suggestions?

    I am having troubles, when I open LR I get a message that there is an error and it will try to fix the error next time it opens. LR closes on it's own, I reopen it and get that same message next time it opens, and this is going on and on where I can not use LR, any suggestions? If I click on a different set of photos in the libary before I get that message I might or might not get the message next time it oipens, but I still can not get to those photos, and it is not just one or two but most of my photos. HELP!!!!
    Thanks
    Carol

    The first thing I would suggest is for you to go to the folder containing your catalog, using your system browser. There will be a folder that has the extension .lrdata. Delete that folder, and then try to start Lightroom. If that doesn't work, replace your catalog with your most recent backup.

  • How to get the Grand Total in Module pool Screen

    Hi Frds.
         How to get the Grand Total in Module pool Screen
    Example i have 10 different materials
    for each matarial has different moving . But in my case matarials is doesnt matter here
    10 material Moving Average price to do Frand total and display in one column...
    Please Help me out Frds.
    Regards,
    Kabil

    Hi
    You need to calculate the total in a module of PAI (or PBO) event:
    PROCESS PAI.
       LOOP.....
       ENDLOOP.
      MODULE CALCULATE_TOTAL.
      MODULE CALCULATE_TOTAL.
        GRAND_TOTAL = 0.
         LOOP AT ITAB,
            GRAND_TOTAL = GRAND_TOTAL + ITAB-PWB.
        ENDLOOP.
    ENDMODULE.
    In this way the grand total will be calculated as soon as the user presses enter or another command.
    You can't insert the calculation in the loop of table control, because this loop runs the visible lines only, so it's better to calculate the total out of those loop,

  • HT3275 I get the following message - "Time Machine could not complete the backup."  "Unable to complete backup."  "An error occurred while creating the backup folder.""

    I get the following message - "Time Machine could not complete the backup."  "Unable to complete backup. An error occurred while creating the backup folder."" 
    This MAC is partioned with Windows 7 with only  50 gig devoted to Windows so my son can play Flight Simulator X on the machine. 
    I have a WD Passport External Hard Drive for the Back Up
    I have spoken with WD Tech Support and they have been fantastic but I still keep getting this message.  Any thought?
    Maxx

    Reboot the TC.. it sometimes gets lost on the network.. are you still actually using 10.6.8 as the problem is more prevalent on Lion and ML it seems is no better.
    You might find reset of the TC is needed. change the names to short, no spaces pure alphanumeric.
    Reset the TM to the new name.. use the A4 in Pondini's great KB.
    http://pondini.org/TM/Troubleshooting.html

  • How to get the current GMT time in java

    Hi,
    How to get the current GMT time in java
    Thanks

    System.getCurrentTimeMillis() or new Date().
    [url http://www.javaworld.com/jw-12-2000/jw-1229-dates.html]Calculating Java dates: Take the time to learn how to create and use dates
    [url http://www.javaalmanac.com/egs/java.text/FormatDate.html]Formatting a Date Using a Custom Format

  • How to get the date n time for log in ODI

    Hi,
    I wanna ask, what is the syntax for getting the date n time when i specify the location of log for Interface. Thanks.

    I quite do not get what you are trying to achieve here.
    - In a mapping, use the DBMS engine sysdate command.
    - In a variable, you can refresh the variable value using a "select sysdate from dual" type of query.
    - You can also use the appropriate odiref substitution method to get a date. For example:
    Current year is: :<%=odiRef.getSysDate("y")%>
    Hope this helps.
    -FX

  • How to get the latest update time of a info provider in ABAP

    hi experts,
    i am doing a ABAP program and need to get the latest update time of a info provider , does anyone know where it stores in BW or any other way to get it?
    many thanks
    WHY

    Table : RSREQDONE
    you can give INFOPAK_ID as parameter and search for latest/last Request ID and dispaly time and Date.
    Cheers
    Praveen

  • HOW TO GET THE GRAND TOTALS IN  ALV USING GRID FM

    Hi,
    I would like to know that am getting the sub totals using the ALV_GRID FM,
    But I need Grand totals how i can get and what is the paramater to keep = x to get this Grand totals\.

    Hi,
    If you have the DO_SUM = 'X' in the field catalog internal table for the corresponding column..Then you will get the grand total..
    Thanks,
    Naren

  • How can I get the date and time and display it on the report main page?

    Gurus,
    How can I get the date and time and display it on the report main page?
    Thanks!

    Hello,
    You can create a Formula Colum returning a date :
    function CF_1Formula return Date is
    begin
    RETURN(SYSDATE);
    end;
    Put a Field in the Layout having this formula column as source .
    Regards

  • Get the date and time from iframe.

    Hi,
    Am using jdeveloper 11.1.1.6.0., I have used the following iframe source which gets the date and time.
    <af:form>
    <iframe src="http://free.timeanddate.com/clock/i3xb4nm0/n1722/tt0/tw0/ts1" frameborder="0" width="244" height="19">
          </iframe>
    </af:form>
    I need to get the date and time separately to perform some validation. How can i  get it.
    regards,
    Prasad K T,
    9840021070

    Prasad,
    I don't understand your use case. The url you use is a json web service which returns it's result as either xml or json payload. Why do you pretty print this as a web page and try to get to the result this way?
    Why don't you get the result directly using the json result or (AFAIK) the java script api which the service also provides.  Check the documentation of the service.
    From your description I understand that the user enters a time. You need to know if the time is before or after 2:30pm and have to set a 'shift' to A or B.
    Where do I need a timeservice in this validation?
    From what I see your approach won't work. As I still don't understand the use case I don't know how to help.
    Timo

  • Ical problem already 3 weeks after the update, get the message every time username or password is incorrect as I do with this password and username in mobileme bowl. now get the message The server responded with \ 'HTTP/1.1 409 Conflict \'. can someone he

    Ical problem already 3 weeks after the update, get the message every time username or password is incorrect as I do with this password and username in mobileme bowl. now get the message
    The server responded with \ 'HTTP/1.1 409 Conflict \'.
    can someone help me

    Ical problem already 3 weeks after the update, get the message every time username or password is incorrect as I do with this password and username in mobileme bowl. now get the message
    The server responded with \ 'HTTP/1.1 409 Conflict \'.
    can someone help me

  • XMII 12.x  Can you get the Server's Time Zone from a webservice call?

    Is there a MII / NW webservice call to get the server's time zone?

    After thinking about it a little my best approach was just a simple JSP page, because I really was more intersted in the servers GMT offset.
    <%@page import="java.util.*" %>          
    <%
    Calendar myCalendar = new GregorianCalendar();  
    int gmtOffset = (myCalendar.get(Calendar.ZONE_OFFSET) + myCalendar.get(Calendar.DST_OFFSET))/(1000 * 3600); 
    %>
    <%=gmtOffset %>

  • How cost;ly it is to get the current system time

    I am using this call "System.currentTimeMillis()" to get the current system time. I need to now how costly it is to get the current system time.

    Why don't you time it -:) Run it 10000 times and print the first and last result. The difference is the time it took.

  • GETTING THE AVERAGE OF TIME

    Hi,I have the following code which returns day of week name, position and date and time of surgeries.
    SELECT
    DATENAME(WEEKDAY,OPE_START_TIME) AS DOW,
    [OPE_ORDER_IN_SESS_ASC] AS POSITION,
    OPE_START_TIME AS [TIME]
    FROM table1The data looks like thisHow can i group this data so I get the average start time by day of week and position?

    try this
    \declare @table table(c1 varchar(20),c2 int,c3 datetime2(0))
    insert into @table
    values('monday',1,'2015-04-29 02:09:42')
    ,('monday',1,'2015-04-29 02:05:42'),
    ('tuesday',1,'2015-04-29 02:59:42')
    ,('tuesday',2,'2015-04-29 02:55:42')
    ;with cte as (select avg(datepart(second,c3)+((datepart(minute,c3)+(datepart(hour,c3)*60))*60)) as c3
    ,c2,c1 from @table
    group by c1,c2)
    select right('0'+cast(c3/3600 as varchar),2)+':'+right('0'+cast((c3%3600)/60 as varchar),2)
    +':'+right('0'+cast((c3%3600)%60 as varchar),2) as [AvgTime],c2,c1 from cte
    Hope it Helps!!

  • HT1176 My airport TM will not backup and i keep getting the error msg "Time Machine couldn't complete the backup...An error occurred while copying files. The problem may be temporary. If the problem persists, use Disk Utility to repair your backup disk."

    My Airport TM will not backup and i keep getting the error msg "Time Machine couldn’t complete the backup...An error occurred while copying files. The problem may be temporary. If the problem persists, use Disk Utility to repair your backup disk."

    My Airport TM will not backup and i keep getting the error msg "Time Machine couldn’t complete the backup...An error occurred while copying files. The problem may be temporary. If the problem persists, use Disk Utility to repair your backup disk."

Maybe you are looking for