Date/Time events help

I'm trying to make vpet like game on flash for class, but I need to work with time and dates for events like feeding, sleep, etc.
At least for now I need help figuring out how to make the game check like every 5 minutes to bring up an alarm about the pet needing food.
Sadly all i have is this:
stop();
const millisecondsPerMinute:int = 1000 * 60;
const millisecondsPerHour:int = 1000 * 60 * 60;
const millisecondsPerDay:int = 1000 * 60 * 60 * 24;
var date1:Date = new Date();
trace(date1);
I get the actual date, but don't know exactly what to do to make it check every 5 minuts or so. Don't know if it's with "if" or "do/while".

OK, so I looked shareobject. Once it starts to play, it checks for data and since there is none it creates one.Now where I am stuck is how to make it store data in it.
For example I found this online:
var so:SharedObject = SharedObject.getLocal("test");
if (so.size == 0)
  trace("created...");
  so.data.now = new Date().time;
trace(so.data.now);
trace("SharedObject is " + so.size + " bytes");
so.flush();
The game starts, the pet hatches after some time. How do I use or modifiy this to make the shareobject go straight into the newborn instead of the egg? Do I have to do something with the "so.data.now"?

Similar Messages

  • Connection failure - Itunes tells me to check my date/time. Help?

    Evening, everyone.
    I'm having some trouble connecting to Itunes. I get the following error message when i try -
    "Itunes could not connect to the music store. A secure network connection could not be established.
    Check that your computer's date and time are correct and try again."
    I duly checked the date/time and found that they were wrong, so updated them and tried again and still received the same message.
    I also tried turning off my Norton and trying to connect with it disabled, with no luck. The other things currently running are DVD43, Sonic Cineplayer and MSN messenger. I can't see why any of them would be interfering, but i'm happy to be corrected.
    I've had no luck finding answers on the Itunes support page. I'm not sure what other information i can give to help elucidate, so feel free to ask.
    Any ideas?
    Hallmark Xblade   Windows XP  

    Has anyone figured this out yet - this is the same message I get. I have the newest version of iTunes and just started using it with music I already had. First time trying to buy music, and that's what I got!!
    Please someone!!!!!!!!
    Dell XPS 400   Windows XP  

  • Date time format help

    Hi Experts,
    I am getting date-time in 2009-09-17 13:05:16 format. But I need to send it to database as 2009/9/17 1:05:16 PM format.
    When date is 08 only 8 needs to be present. And time should be in AM/PM format. Please suggest..
    Thanks,
    Vishal

    Hi Vishal,
    source field --> datetrans function --> target.
    Double click on datetrans fucntion and on source format put yyyy-MM-dd HH:mm:ss and in target format put yyyy/MM/dd K:mm:ss a
    Copy and paste directly from here. If you write you may miss something. Then your output should be as expected.
    Regards,
    ---Satish

  • Date, time please help

    all i want is to assign the current minutes to an integer variable, but it seems i can no longer
    use getMinutes() to do this, i know its probably me bein thick but can anyone help?
    Andy
    ps i will later need to assign hours to a varibale and seconds to another variable

    Calculating Java dates: Take the time to learn how to create and use dates
    Comparing Dates
    Formatting a Date Using a Custom Format
    Parsing a Date Using a Custom Format

  • How to return a specific date/time range and last event details, when checking the event log via command prompt

    I am new to scripting (literally started reading/learning scripting a few hours ago), and I am stuck in trying to get my current script/command to filter a specific date range.
    * Note: I am working with Server 2003 and 2008; because of the environment I am in, a lot of scripts (such as Powershell and VBScript) don't work; trying to stick with command line, as it appears to be the only thing that functions correctly in my environment
    I am trying to search the System log in event viewer, for the most recent server reboot. Here is the command that I am currently running:
    ===========================================================
    C:\Windows\System32\cscript C:\Windows\System32\eventquery.vbs /L System /FI "id eq 1074"
    ===========================================================
    When run, the output looks like this:
    ===========================================================
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved
    Listing the events in 'system' log of host 'xxxxxxxxxxxxxxx'
    Type Event
    Date Time    Source
    Information 1074
    12/18/2013 2:48:06 AM    USER32
    Information 1074
    11/20/2013 3:25:04 AM    USER32
    Information 1074
    10/23/2013 2:06:09 AM    USER32
    ===========================================================
    What I would like it to do is only show events that have happened in the last seven days, as well as show the event details if it does find an event that matches the criteria.
    Any help would be greatly appreciated. Thanks!
    Nick

    I would prefer using Powershell , you can use below code 
    function Get-EventViewer
    param(
    [string[]]$ComputerName = $ENV:COMPUTERNAME,[string]$LogName,[int]$eventid
    $Object =@()
    foreach ($Computer in $ComputerName)
    $ApplicationEvents = get-eventlog -logname $LogName -cn $computer -after (Get-Date).AddDays(-7) | ?{$_.eventid -eq "$eventid" }
    foreach ($event in $ApplicationEvents) {
    $Object += New-Object -Type PSObject -Property @{
    ComputerName = $Computer.ToUpper();
    TimeGenerated = $event.TimeGenerated;
    EntryType = $event.EntryType;
    Source = $event.Source;
    Message = $event.Message;
    $column1 = @{expression="ComputerName"; width=12; label="ComputerName"; alignment="left"}
    $column2 = @{expression="TimeGenerated"; width=22; label="TimeGenerated"; alignment="left"}
    $column3 = @{expression="EntryType"; width=10; label="EntryType"; alignment="left"}
    $column4 = @{expression="Source"; width=15; label="Source"; alignment="left"}
    $column5 = @{expression="Message"; width=100; label="Message"; alignment="left"}
    $Object|format-table $column1, $column2, $column3 ,$column4 ,$column5
    $Object.GetEnumerator() | Out-GridView -Title "Event Viewer"
    You can do a function call like
    Get-EventViewer -LogName system -ComputerName "computername" -eventid "2017"

  • Event Creator/Date/Time

    We are using iCal Server as our office calendar.
    In Now-Up-to-Date we were able to see who created an event, and the date and time it was created. This was extremely helpful when a secretary scheduled an event for an attorney in the office - so the attorney would know who to go to with questions and/or which events were scheduled first (for prioritizing purposes if two events were scheduled at the same time).
    Is there anyway to see this information in iCal and/or is iCal working to add this feature?

    what exactly are you trying to achieve is my obvious question. A single forensic inquiry is different to a full listing of all events over years.
    I assume you mean the created date shown in this view of the database.
    https://support.cdn.mozilla.net/media/uploads/images/2014-06-02-18-47-50-c207d9.png
    The values stored there are javascript date time values.
    If you enter the value into a javascript like
    var d = new Date(1374129123000000);alert(d);
    Where 1374129123000000 is your number not mine then the alert will be the datetime UTC
    You can enter that javascript onto the error console and have it evaluate. Tools menu (Alt+T) > error console.

  • Calendar no longer expands panel to edit event date/time

    This issue just occurred out of the blue. When editing event details in the calendar, I click on the date/time panel to edit the date/time/repeat/etc. The expected action is for that panel to expand and be scrollable. What it is doing now is showing the prompts, but not expanding/giving a scroll and smushes everything together. Any ideas on what could be causing this and how to resolve? Screenshot of the issue:
    I'm on Yosemite 10.10.1 and Calendar 8.0 (2026)

    As always, I have no "Edit" button even one minute after posting, so I reply to my own post. I did also trash "com.apple.Calendar.plist", no change at all either in my chosen preferences or in the missing messages issue,

  • Time Machine Data Transfer - From FireWire Drive to Time Capsule - HELP!

    Time Machine Data Transfer - From FireWire Drive to Time Capsule - HELP!
    I've been searching for weeks for a solution to my problem. Here's the story I've come across since I installed Leopard on Oct. 26, 2007.
    I first installed Leopard on my Early 2006 MacBook and set up Time Machine with a 200GB external FireWire drive. Since then, things have been fine, until Time Machine started deleting the oldest backups. I'm a pack-rat and hated this feeling of losing data. So, I now have a few months worth of backups on my 200GB FireWire drive.
    The Time Capsule is released, I finally talk myself into getting one and transferring my old data from the 200GB drive to my 1TB TC.
    I did some researching through forums about how to move data from one Time Machine drive to another, so I took the concept and wanted to apply it to my Time Capsule. I made a DMG image of my 200GB drive, in order to move the data. I figured if I can make an image, copy it, and open it on the Time Capsule - all will go smoothly - just as some had mentioned they've done with external drives.
    Now, I have a 164GB DMG image of my Time Machine, with no hope in sight of gaining it back. I've tried taking the image, using Disk Utility, and restoring my original 200GB external with the imaged Time Machine data, but whenever I do, I come across error messages.
    In Disk Utility, I've done the following steps:
    * Disk Image is found on Time Capsule
    * I select the 200GB drive and select 'Restore'
    * I drag and drop the Disk Image to the 'Image' field
    * I drag and drop the 200GB drive into the the 'Restore' field
    * Select 'Erase Destination'
    * Select 'Restore'
    * I get the warning message that I'll erase the drive - I proceed
    * I enter my password
    Error message pops up:
    "Restore Failure: Could not find any scan information. The source image needs to be imagescanned/scanned for restore."
    I select the image in Disk Utility, then proceed with the following steps:
    * Click on "Image" then down to "Scan Image for Restore"
    * I enter my password
    After hours of waiting, I get another error message:
    "Unable to scan. (Broken pipe)."
    I'm going to see, after transferring the DMG to the Time Capsule, if I can drag-and-drop the files from the Time Capsule drive onto the 200GB hard drive.
    IF anyone has any more suggestions, please let me know!

    32 updates on this Mac since December 2007 - Hardware, software, OS...
    They keep coming at about 6 or 7 a month. Some of them I don't care about, but several are essential. 10.5.3 has been seeded to the testers a couple of times and will probably show up in the next few weeks. Jaguar wasn't worth a d*mn until 10.2.6, Panther about 10.3.4, Tiger about 10.4.4 - I'd say we are ahead or on schedule Too bad I can't get Apple to fix Spaces. I wish they'd focus on what I want but I guess some take more time than others.
    2007-12-18 00:32:39 -0800: Installed "GarageBand Update" (4.1.1)
    2007-12-18 00:32:43 -0800: Installed "QuickTime Broadcaster" (1.5.2)
    2007-12-18 00:33:07 -0800: Installed "Security Update 2007-009" (1.0)
    2007-12-18 00:33:29 -0800: Installed "QuickTime" (7.3.1)
    2007-12-19 09:32:03 -0800: Installed "MacBook MacBook Pro Software Update" (1.1)
    2007-12-23 23:57:32 -0800: Installed "Security Update 2007-009" (1.1)
    2008-01-16 09:18:07 -0800: Installed "iMovie Update" (7.1.1)
    2008-01-16 09:18:14 -0800: Installed "Front Row Update" (2.1.2)
    2008-01-16 09:18:45 -0800: Installed "iTunes" (7.6)
    2008-01-16 09:19:31 -0800: Installed "QuickTime" (7.4)
    2008-01-29 21:33:14 -0800: Installed "Keynote Update" (4.0.2)
    2008-01-29 21:33:23 -0800: Installed "Pages Update" (3.0.2)
    2008-01-29 21:33:31 -0800: Installed "Numbers Update" (1.0.2)
    2008-02-02 01:18:43 -0800: Installed "iWeb Update" (2.0.3)
    2008-02-05 20:12:17 -0800: Installed "iPhoto Update" (7.1.2)
    2008-02-15 09:03:49 -0800: Installed "iLife Support" (8.2)
    2008-02-15 09:04:17 -0800: Installed "QuickTime" (7.4.1)
    2008-02-15 09:04:51 -0800: Installed "Leopard Graphics Update" (1.0)
    2008-02-19 23:44:37 -0800: Installed "Keyboard Firmware Update" (1.0)
    2008-02-25 19:24:33 -0800: Installed "iTunes" (7.6.1)
    2008-03-03 17:14:18 -0800: Installed "GarageBand Update" (4.1.2)
    2008-03-03 17:14:31 -0800: Installed "iPhoto Update" (7.1.3)
    2008-03-12 18:11:36 -0700: Installed "AirPort Utility" (5.3.1)
    2008-03-18 10:03:57 -0700: Installed "Safari" (3.1)
    2008-03-20 13:00:58 -0700: Installed "Security Update 2008-002" (1.0)
    2008-03-20 13:01:04 -0700: Installed "Time Machine and AirPort Updates" (1.0)
    2008-03-21 22:49:16 -0700: Installed "Digital Camera RAW Compatibility Update" (2.0)
    2008-04-03 00:50:22 -0700: Installed "Front Row Update" (2.1.3)
    2008-04-03 00:50:50 -0700: Installed "QuickTime" (7.4.5)
    2008-04-03 00:51:58 -0700: Installed "iTunes" (7.6.2)
    2008-04-08 17:16:02 -0700: Installed "Keynote Update" (4.0.3)
    2008-04-08 17:16:08 -0700: Installed "MacBook Pro EFI Firmware Update" (1.5)

  • Writing to a data file with time stamp - Help!

    My program currently asks the user to enter a path to save the data from my virtual channels. What I want is to have a default directory to store my data in and also have the file name that is created to be the date. I tried to use create open or replace but I cant get it to work. Any suggestions would be great. Also and comments to the code would help out a lot.
    Thanks
    Attachments:
    Test.vi ‏141 KB

    Look at the attachment. It uses a front panel path control set to only select a new or existing folder (right click and Browse Options). Then, using a Build Path and a Format Date/Time String, a full path to a file is created. Pass this to your Open/Create/Replace File.
    Attachments:
    Date to File Name.vi ‏13 KB

  • Is it possible to export all of the fields for calendar events ? Specifically we're after the event creation date time.

    We need to find out when a calendar event was created.
    I have been unable to find this information in Lightning or any exports.
    From looking into the local.sqlite database file the cal_events table has a field called
    time_created. Unfortunately when I try to export this, the format is unknown so it just
    exports as a number.
    Does anyone know of another way to export this information ?
    Thanks in advance

    what exactly are you trying to achieve is my obvious question. A single forensic inquiry is different to a full listing of all events over years.
    I assume you mean the created date shown in this view of the database.
    https://support.cdn.mozilla.net/media/uploads/images/2014-06-02-18-47-50-c207d9.png
    The values stored there are javascript date time values.
    If you enter the value into a javascript like
    var d = new Date(1374129123000000);alert(d);
    Where 1374129123000000 is your number not mine then the alert will be the datetime UTC
    You can enter that javascript onto the error console and have it evaluate. Tools menu (Alt+T) > error console.

  • Can someone help with a previous post labeled "Writing to a data file with time stamp - Help! "

    Can someone possibly help with a previous post labeled "Writing to a data file with time stamp - Help! "
    Thanks

    whats the problem?
    Aquaphire
    ---USING LABVIEW 6.1---

  • HELP - no date/time and clip order is weird

    Hello,
    I have a feeling I have seen people with the same problem as I have now but I haven't found a good answer on what to do. First of all, after having capture my clips into Premiere CS3, the date/time of the clips are obviously not in the app - can't find them anywhere so a workaround is to use paper and pen and look at the timestamp of the camera when a shot was taken. Not so good. It is weird that I can't make this date/time marking of clips work - even KISS apps like WMM does this very easily. Anybody?
    But last time I run into a tricker problem. After capture I had a greater number of clips, and now I can't sort them in any sensible order. Maybe they were initally sorted chronologically but after having reordered for some other reason the chronological order seems impossible to revert to.
    Also the automatic clip naming seem to be of no help:
    Untitled Clip 01 01 9
    Untitled Clip 01 01 10
    Untitled Clip 01 01 11
    Untitled Clip 01 01 12
    Untitled Clip 01 02 7
    Untitled Clip 01 02 8
    Untitled Clip 01 02 9
    Untitled Clip 01 02 10
    Untitled Clip 01 03 4
    Untitled Clip 01 02 5
    seems to have the cronological order
    Untitled Clip 01 01 9
    Untitled Clip 01 02 7
    Untitled Clip 01 03 4
    Untitled Clip 01 01 10
    Untitled Clip 01 02 8
    Untitled Clip 01 02 5
    etc
    Anybody who can give me some advice about this. This is very time consuming and annoying...
    Thanks
    /D

    Sorting by media start assumes all on the same tape and only one tape per bin. Might not be the case always, especially if you want to match up shots from several cameras using datacode. That's why I use Scenalyzer to put date/time in the filename.
    Adobe didn't mention displaying datacode in their spec, so it shouldn't really be too much of a surprise to find it isn't included.
    Since I don't use PPro's capture, I don't know the subtleties of the results of opting to split capture files into scenes. Does that give any hints in filename or logging etc?
    If you want extra datacode facilities in CS5 (gossip says CS4 is beyond the new feature stage), then best submit a request via
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • How Does Time Machine Help If... iCal Data Lost?

    Hi,
    How does Time Machine help if, say, your iCal database gets messed up? Or, how does it help if you accidentally delete all your playlists from iTunes? I'd be interested to know.

    That's a very good question (although probably better directed at Apple than us). Because Time Machine is new and Apple's in house programs handle data in different ways, there are a range of different means of recovering data for different applications. Not very user friendly and iCal is one of the least user friendly ones.
    As an experiment, because I don't make much use of iCal and have no real idea how it works, I tried to find out how to restore its data. Starting with working with the application: nope, not TM aware at present. OK, where does it restore its data? Next step Spotlight where, as it happens, the obvious search "Calendars" brings up a folder in ~/Library labelled that with a whole lot of mysterious stuff in it. I'm pretty sure that restoring that folder would do the trick. No doubt, if you could figure out which Calendar belongs to what in the above folder you could restore a single calendar that was causing problems. Still, Apple's clearly got some work to do to make this more transparent. Roll on iCal4!
    (By the way Mail also restores from within the program).

  • With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?

    With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?
    With Lion 10.7.1. you where able to drag events from "All Day Events" into the "Reminders" bar to create upcoming reminders.

    Exactly the same question I was about to post!
    Great being able to sync reminders (well overdue) however if I have to re-type a calener envent into reminders it's a waste of time!! 
    Come on Apple!!
    Just need an option for the calender event to add to reminder or the old drag to add to reminder functionality back, Please???

  • Recording Additional Data on Time Event Types

    Our company is using the following time event types to record time data:P10 - In
    P15 - Break Start
    P02 - Lunch Start
    P25 - Lunch End
    P20 - Out
    We have only been able to associate a cost center to time event type
    P10, but have the need to associate it to P25 or identify a time event
    type not already in use that will accept a cost center to be associated
    to it. When we try to enter a cost center with time event tyep P25, the
    error message states "You can not use time event type P25 to record
    additional data."
    In our comapny, we have the need to round the in and out punches for
    each employee, but not round the other punches of the day. We can't use
    the first and last punch of the day to accomplish this because we have
    people who work split shifts. We also require a cost center to be
    associated with every punch that begins a productive time pair.
    Returning from lunch is the start of a productive time block, and is
    considered an "In" punch that shouldn't be rounded.
    I need to know if there is a way to configure the time event types to
    accept additional data or if there are any other time event types
    besides P10 that allow additional data to be recorded with them.

    Hi,
    Does the person entering the punch enters the cost center? How do you identify outside the SAP system before entering the data in SAP system what is the cost center related to the punch.
    Also Time events table or teven table cannot be enhanced.
    You could use CATS for hours recording related to a cost center.
    Regards,
    Divya

Maybe you are looking for