Moving car at Time/Date for 11 hours

Hi,
I'm making a timeline with a moving car. It has to go from left to right in about 11 hours.
I got this code and the car is moving from left to right:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
bus.x = 0;
bus.y = (stage.stageHeight-bus.height)/2;
var carTween:Tween=new Tween(bus,"x",None.easeNone,300,stage.stageWidth-bus.width,39600,true);
carTween.addEventListener(TweenEvent.MOTION_CHANGE, onChange);
function onChange(e:TweenEvent):void {    
trace(bus.x);
carTween.addEventListener(TweenEvent.MOTION_FINISH, onFinish);
function onFinish(e:TweenEvent):void {
    trace("Out of gas, destination complete");
But everytime I refresh my page the car is at the begin again. So I have to attach it to a Timer/date class to it so it stops at a certain point / time and date.
Can somebody help me out with that because I cant figure it out how to do it..
Tnx

You can have your existing code do that with a little tweaking...
var StartDatum:Date = new Date(2011, 01, 15, 12, 00, 15, 0);
var EindDatum:Date = new Date(2011, 01, 15, 15, 45, 15, 0);
var TotaleTijd = EindDatum.getTime() - StartDatum.getTime();
var MijnTimer:Timer = new Timer(1000);
MijnTimer.addEventListener(TimerEvent.TIMER, Detijd);
MijnTimer.start();
function Detijd(e:TimerEvent=null):void {   // add =null to argument
     var Nu:Date = new Date();    
     var TijdOver:Number = Nu.getTime() - StartDatum.getTime();
     var Voortgang:Number = TijdOver / TotaleTijd;
     car.x = stage.stageWidth * Voortgang;
Detijd();  // call it immediately when the program starts

Similar Messages

  • Error when trying to enter time data for hourly employees using CAT2

    Hi Experts!
    I'm trying to enter time data for an absence type using CAT2 for hourly employees and it's giving me an error saying "for attendance type, function or/and one of the URA is required".
    I'm not sure what that means, the system has no functions available. Entering time data for full-time salaried employees is working just fine.
    Any insight would be greatly appreciated!
    Thanks.

    hI,
    Firstly check infotype 0315
    In that check sender cost centre
    Next chek whether the Attendent / Absende Tyep which you are trying to enter is configured
    That meas it should pop up (F4) when u try to enter using CAT2
    in the Attnendence /Abence field
    REWARD POINTS

  • Scheduling (time) data for the resources

    Hi Experts,
    Where do i find scheduling (time) data for the resources, Plz tellme the table names, there is any standard tables is there..or not.
        I find out the where we get the scheduling (time) data for the resources, but problem is i got structure name and fielsd name and data element name.
        I am planning to go for  Generic data source but problem is...... In structure does't maintain the data so how can i find the Table names......plz any one help me in this, Is there any standerd tables is there....
    P3000
    RCRDE
    RC68A
    P3003
    P3005   
    These are all structure names ...i got all the fields this structures only ....How can i find the table names.
      Any one help me in this.......
    Regards
    Venkat

    Debug the structuref for the tables.
    Regards,
    D

  • MSS Time Approval - Detailed approval view shows time data for different PN

    Hi Experts,
    We're using the standard MSS time approval without workflow and here're 2 issues we have:
    There're multiple time records for multiple employees in MSS for approval.
    1. When manager tried to select all the records for one employee and click the "Approve" button in the collective approval screen, then all the records will be approved including records of other employees.
    2. When manager click the hours of one record for a certain employee to go to the detailed/individual view, other employee's time data will be displayed in the detailed view window.
    Please help!
    Thanks,
    Hongling

    Hello Kamalbabu,
    after Migration of our ess applications from WebDynpro JAVA to Web Dynpro ABAP we have a problem that sounds similar to the one you descriped above.
    In POWL the button 'details' (detail view) for leave request approval seem to have no function.
    Because your post is a few years old, I guess you solved the problem and hope you can share your solution with us.
    You will find more information about our specifc problem in this threat: http://scn.sap.com/message/15482063
    Thank you.

  • Why does a digital indicator formatted for time & date add 16 hours to the input?

    I wire a digital indicator with a double precision value that is supposed to indicate an elapsed time. But the indicator (formatted for time and date, with the date inactive) always adds 16 hours to the wired input.
    This problem occurs even in a simple vi I wrote that only consists only of a constant wired to the indicator.
    Using LabView 6.0.2

    Labview interprets the number passed into an indicator formatted for date & time as seconds since Jan. 1st 1904. I'm assuming that since you're looking for elapsed time this is not what you're passing in. One thing that I've done is get the elapsed time in seconds and write a routine to convert that into whatever format you want.

  • Printing problem linked to EXIF time data for JPEG images.

    For some years I have been using Photoshop Elements 8.0 with no problems of any kind. My computer runs on XP Professional with a system comfortably in excess of the minimum requirements to run Elements 8.0. I load my images into Elements from a card reader which is the same one since I got this version of Elements. I shoot mostly in JPEG with a Nikon D300. I print to one of 2 Epson printers, an SX100 and a PX700W. I don't use the wireless feature of the PX700W, connecting it via USB.
    About a year ago I suddenly began to experience printing problems. If I tried to print an image Elements crashed just at the point where printing would begin. By trial & error I discovered that if I adjusted the time in the EXIF data of the image in Elements, whether by advancing or retarding it by hours or days and then adjusted it back to the original time I had no problems printing that image thereafter.
    I also discoveredc that where I had shot in RAW I could print direct from the RAW image in Elements or from the JPEG I saved from an edited in RAW and had no problems.
    I saw the forum discussions about the issues about the date/time in EXIF having been changed following the import into Elements. For those images I still had on my memory cards I checked the EXIF data in Elements and compared it what was on the image on the card. They were the same. I also checked the time zone and time settings of the camera and they were correct.
    I backed up my catalog, re-formatted the computer to bring it back to its ex-factoy status, re-installed Elements and restored my catalog. I imported new images, tried to print them and the problem was still there.
    Before I might upgrade to Photoshop Elements 10 I'm hoping someone else may tell me they have had the same problem and, hopefully, be able to tell me how they fixed it. I know the workaround will bypass the problem but it really annoys me that it suddenly appeared and I seem to be stuck with it. I'm also concerned that, given I totally re-formatted my computer but the problem  is still with me, that the problem may be imbedded in my catalog and simply gets backed up to,\and restored from,  my backup.
    I'd be grateful for any ideas.

    Hi Miceal,
    Though I'm not sure, but see if Catalog repair and optimize helps resolve the issue.
    For doing this, click File >> Catalog and selec your catalog and then click "repair' button.
    Tick the checkbox for rebuilding indices in the repair workflow.
    Now perform the optimize operation on the catalog similarly.
    Let me know if that helps.
    Thanks
    andaleeb

  • Shifting time/date for many pictures

    When I returned from holiday I forgot to change the time on my camera, so the thousands of pictures I've taken in the last three months are 12 hours off (which sometimes causes the date to be off).
    Flickr has a function for shifting the time of pictures, which works nicely. (I guess I'm not the only person to forget to change their camera clock .) I was hoping there was a way to do this in Automator, but if there is I can't figure out how.
    Is there any way of shifting the time (and maybe date) without doing it manually for each picture? I know I can batch change, but that sets the time to a specific value, while what I want to do is subtract 12 (or 13) hours for each picture.

    I was searching for something else when I came across this thread that might help you with your time changes:
    http://discussions.apple.com/thread.jspa?messageID=3274468&#3274468
    The last two posts there from Old Toad and Ben Thoma mention an app called Joe's iPhoto Date Shifter Script. I wonder if it would work for you.

  • Set a time/date for forms to automatically close

    We are using Forms Central for proposal submissions. There is a deadline for the proposals to be turned in, and up to now, we've had to turn the form off by hand.
    Is there a way to set up the form so that it automatically closes itself at a certain date and time? So, for instance, if a proposal is due on Friday, February 7, at 5:00 p.m. Eastern time, the form will switch itself to "Closed" at that time?

    Not at this time.
    There is a feature-request form available, where you could vote for this feature:
    https://adobeformscentral.com/?f=XnF-KJVCovcEVQz9tZHYPQ

  • Cartesian time data across multiple hourly rows

    Looking for a solution for exploding time rows into multiple rows by hour. For example, take a row like this:
    EventTime         EventLengthSeconds
    2014-04-25 13:31:16.857 6657
    What I need is multiple rows to allocate the time by hour like this:
    EventTime         EventLengthSeconds
    2014-04-25 13:31:16 1724
    2014-04-25 14:00:00 3600
    2014-04-25 15:00:00 1333
    I've crafted a solution using a derived table that I cross join to then use case statements, etc. but it's super ugly and I'm embarrassed to post it. 
    I'm thinking in SQL 2012 there must be a elegant and efficient way to do this with the new windowing functions that are available. 
    Thanks for any insights and suggestions.

    You need a table of hours for this problem. The more general concept is a table of numbers. That is, a table that spans the dimension you are working and provides a row for each discrete value.
    Below is an example how you can fill the table and then a query which uses this table:
    CREATE TABLE Hours (Hour smalldatetime NOT NULL PRIMARY KEY);
    WITH digits (d) AS (
       SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION
       SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION
       SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION
       SELECT 0)
    INSERT Hours (Hour)
       SELECT dateadd(Hour, Number, '20000101')
       FROM   (SELECT i.d + ii.d * 10 + iii.d * 100 + iv.d * 1000 +
                      v.d * 10000 + vi.d * 100000 AS Number
               FROM   digits i
               CROSS  JOIN digits ii
               CROSS  JOIN digits iii
               CROSS  JOIN digits iv
               CROSS  JOIN digits v
               CROSS  JOIN digits vi) AS Numbers
       WHERE  Number > 0
         AND  dateadd(Hour, Number, '20000101') < '20500101'
    DECLARE @eventtime datetime2(3) = '2014-04-25 13:31:16.857',
            @eventspan int          = 6657
    SELECT @eventtime AS EventTime,
           3600 - (60*datepart(minute, @eventtime) +
                      datepart(second, @eventtime)) AS EventSeconds
    UNION ALL
    SELECT Hour,
           CASE WHEN dateadd(second, @eventspan, @eventtime) >
                     dateadd(HOUR, 1, Hour)
                THEN 3600
                ELSE datediff(SECOND, Hour, dateadd(second, @eventspan, @eventtime))
          END
    FROM   Hours
    WHERE  Hour > @eventtime
      AND  Hour < dateadd(SECOND, @eventspan, @eventtime)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How do I get time & date for specific web sites visits from the fire fox history?

    how do I get history information for the time and date I went to specific web sites from firefox?

    The 'View' menu at the top, select Sidebar > History. At the right top of the sidebar that appears, click "View" button, select "View by date" or "View by date and site".

  • Datalogging using Waveform for long hours

    Hi all,
     Im logging the data using the waveform. The chart length size is given as 1024. I need to log the data for long hours (5 to 10 hours). How much i have to set in the chart length ? how it is calculated ? Is it the right way for extended period of data logging ?
    Naganatha Subramanian

    naganathas wrote:
    Hi all,
     Im logging the data using the waveform. The chart length size is given as 1024. I need to log the data for long hours (5 to 10 hours). How much i have to set in the chart length ? how it is calculated ? Is it the right way for extended period of data logging ?
    Naganatha Subramanian
    I'll assume you are asking about the "Wavefrom datatype" when used with charts.
    The history length is the "number of waveforms" and not the number of points. If you present an hours worth of data once every hour, it will display 1000 hours (in thoery, never tried it with those numbers and high sample rates will tax memory).
    If your app spec has a hard and fast req that it drop suff older then the code will have to regularly examine the time of what is in the history and explicitly remove the old stuff ( read history, toss old, redefine history).
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Sample file data for bapi_salesorder_createfromdat2

    Hi all,
    I have written a zprogam which calls bapi_salesorder_createfromdat2  to create sales order.
    While running it shows the error as
    VP   Enter Ship-to-party or Sold-to-party
    can anyone give me file format with real time data  for this bapi
    Senthil

    Hi ,
    This is code have a look at it it help you to create a file.
    LOOP AT lt_temp1 INTO wa_temp1.
       headerx-doc_type    = 'X'.
        header-sales_org    = wa_temp1-vkorg.
        headerx-sales_org   = 'X'.
        header-purch_no     = wa_temp1-bstnk.
        header-distr_chan   = wa_temp1-vtweg.
        headerx-distr_chan  = 'X'.
        header-division     = wa_temp1-spart.
        header-purch_no_s   = wa_temp1-bstnk.
        headerx-division    = 'X'.
        wa_partner-partn_role = 'AG'.
        wa_partner-partn_numb = wa_temp1-kunnr.
        APPEND wa_partner TO it_partner.
        wa_partner-partn_role = 'WE'.
        wa_partner-partn_numb = wa_temp1-kunnr.
        APPEND wa_partner TO it_partner.
        CLEAR: wa_partner.
        LOOP AT lt_temp2 INTO wa_temp2 WHERE kunnr = wa_temp1-kunnr.
          "AND matnr = wa_temp1-matnr.
    *wa_item-itm_number = wa_temp2-posnr .
          wa_item-material   = wa_temp2-matnr.
          wa_item-plant      = wa_temp2-werks.
          wa_item-req_qty    = wa_temp2-fkimg * 1000.
          wa_item-target_qty = wa_temp2-fkimg * 1000.
          APPEND wa_item TO it_item.
        ENDLOOP.
        CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
          EXPORTING
            order_header_in       = header
    *   WITHOUT_COMMIT            = ' '
    *   CONVERT_PARVW_AUART       = ' '
         IMPORTING
           salesdocument          = v_vbeln
    *   SOLD_TO_PARTY             =
    *   SHIP_TO_PARTY             =
    *   BILLING_PARTY             =
           return                 = return
          TABLES
           order_items_in         = it_item
           order_partners         = it_partner.
        IF v_vbeln ne space.
          wa_vbeln-vbeln = v_vbeln.
          APPEND wa_vbeln TO lt_vbeln.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
          HIDE wa_vbeln-vbeln.
          CLEAR: wa_partner,header,v_vbeln, wa_temp2.
          REFRESH: it_partner,it_item.
        ELSE.
    *    LOOP AT return .
          it_error-srno = idx.
          it_error-err_msg = return-message.
          APPEND it_error.
    *    ENDLOOP.
        ENDIF.
        idx = idx + 1.
      ENDLOOP.
    ENDFORM.                    " CREAT_BAPI
    with regards
    nilesh

  • Timebase data for high sample rate

    Hi.
    I am running a Labview program which is sampling data from a strain gauge module in a CDAQ unit at 2kHz.
    The data is being logged to a TDMS file. The porblem I am having is finding a clock that is quick enough to use as a time base for this data. The clock that I am currently using is too slow and I see repeated time data for a few rows in the data file.
    See attached picture.
    So basically I need the clock data that can update at least 2000 times a second.
    Thankyou in advance.
    Rhys.

    As I already said, the internal timebase is more than capable so if you are reading multiple samples and specifying the internal clock, you should not have any problems. I don't know if your problem is how you are recording the data or reading it but the samples should be .5ms apart.

  • Send a mail draft automatically at a later time/date

    Is it possible to set a time/date for an apple mail draft to automatically be sent? 10.10.3

    Here are some prospects
    You might check this out:
    Schedule Mail.app to send an Email in the future
    http://www.chungwasoft.com/sendlater/
    That's just a few from google. Sure there are more prospects.

  • Ipod touch wont turn on i tried restoring it but every time i do it just says its waiting for the ipod to respond. meanwhile my ipod is no longer a black screen but the apple logo with a loading bar underneath that after leaving for 8 hours hasnt moved.

    my ipod touch wont turn on ive tried restoring it but every time i do it just says its waiting for the ipod to respond. meanwhile my ipod is no longer a black screen but the apple logo with a loading bar underneath that after leaving for 8 hours hasnt moved.

    Try:
    - Another cable
    - Another USB port
    - Reboot the computer
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

Maybe you are looking for

  • FMS for syncing background video

    I have a question regarding which version of Flash Media Server will best serve the project I am currently working on and whether the approach I have in mind is possible with FMS. The project envolves Flash Media Server syncing a dynamic background a

  • My iMac Mac OS X v 10.7.4 won't recognize time capsule

    I just bought a time capsule, my iMac can see it when I reset the settings on iMac and I can get through most of the stages to configuring it, but then at the end an unexpected error pops up and boots the time capsule set up out. Once it gets booted

  • Having a horrible time with this hardware - VZW help very much appreciated

    This post is in regards to the HTC Droid DNA, and details my current support dilemma with VZW. If a VZW rep could please read this and comment on a way to find a solution, or if any other users have been in a similar position, your advice would be ap

  • Help Please - my downloaded videos do not work on Ipod !

    Can someone help please - my ipod has stopped playing videos back - I have downloaded some video podcasts and a couple of music videos, and all you see is the first screen, however the voice is fine? Help please!

  • How can i add bizarre corners in and InDesign shape

    Hi guys, I am doing a poster with two images. One is the main color photo and the other is a rounded image to write text on it. Here is the idea http://www.pixentral.com/show.php?picture=17QyMumlIqTfBYafmsKejFuF0SOKp How can i trim the image with thi