Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: get current time within flash?
From: Nathan Dicken
Date: Thu, 20 Apr 2000 22:59:22 +0100

Hi Matt and others...

I hope you don't mind me posting this (Matt) but last year we needed to do
just this with the Lumichron Clock Builder...
(www.lumichron.com/clockbuilder.cfm) Thought I'd post what I have - feel
free to add anything to it and post what you have (I'd like to see that
too).

(this is an example of the chunk of code that resides in the html/javscript
from when you publish your movie using the FSCommand template)


if (command == "initialize") {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();

// hours comes in 0-24 hrs... convert if needed

if (hours > 12) {
hours = (hours - 12);
}
if (hours == 0) {
hours = 12;
}
}


Hope that helps...
Nathan

Nathan Dicken
Fusionary Media



>Hi Brett -
>
>You wrote:
>
>>I just wanted to see if anyone knew of a way to get the current time within
>>flash without using javascript?
>
>Without JavaScript, Flash 4 cannot get the user's time. Sorry.
>
>It's possible to read the time in *from the server* via a server-side
>script (like ASP, for example). This would give you the server's local
>time, and not the user's.
>
>The only way I know of to get the user's date and/or time into Flash is by
>using JavaScript. I'll happily post a way to do this if you ask. :>)
>
>Matt


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: get current time within flash, Matt Wobensmith

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]