Flash Clock
I'm making a flash site and I need some help on something. Okay so basically I'm planning on adding a clock to the site, that displays the same info as your computer's clock. Pretty simple. But then, I want certain aspects of the site to change, relative to the time. Would it be possible to sort of give the clock an instance name, then add some actionscript that basically says 'if the time is past so-and-so, display this swf. If not, then display this.' Or something? So I want two timezones, day and night. Can anyone give me some help or point me in the right direction?
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 08-22-2005, 09:35 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Mobile Phone Clock - Simple Digital 24 Hour Clock
Hi
I need to make a digital clock/watch for a mobile phone flash demo. I know there are lots of clock on flash kit but they all have seconds and minutes - I need just hours and minutes! - The clock also has to be 24 hour.
I've tried taking the code from a flash kit clock and tweaking it but it seems to screw up - for example 07.03 comes out as 7.3 - looks really naf like that!
If anyone can help me out with a source file or some code I would be most greatful!
Countdown Clock (sync With Server Clock In .asp) PLEASE HELP
I used Senocular's awesome countdown clock tutorial found here:
http://www.kirupa.com/developer/mx/countdown2.htm
but I need to figure out how to sync it to my server's clock (I understand I must do this in a .asp file and then load that into flash).
Using vbscript this is what I tried, but obviously it doesn't work I think I may need to convert it completely to seconds first before bringing it into flash:
<%
Dim MyTime
MyTime=now()
response.Write("time="&MyTime)
%>
Does anyone have any ideas?
Thanks so much!
Detecting Clock Wise And Anti Clock Wise Rotation
hey troops!
nube's first post.
can you tell me if it is possible to detect if an object is rotating anti clockwise or not?
at present i get x,y co-ords and use the code below to rotate it which is fine. now i could write an if statement to check if rotation is negative or positive but because rotation can be negative and positive when rotating clockwise and anti clockwise this wouldnt work.
any ideas?
Code:
theAngle = Math.atan2(diffy , diffx);
this._rotation = theAngle*360/(2*Math.PI);
updateAfterEvent();
cheers in advance
Detecting Clock Wise And Anti Clock Wise Rotation
hey troops!
nube's first post.
can you tell me if it is possible to detect if an object is rotating anti clockwise or not?
at present i get x,y co-ords and use the code below to rotate it which is fine. now i could write an if statement to check if rotation is negative or positive but because rotation can be negative and positive when rotating clockwise and anti clockwise this wouldnt work.
any ideas?
Code:
theAngle = Math.atan2(diffy , diffx);
this._rotation = theAngle*360/(2*Math.PI);
updateAfterEvent();
cheers in advance
Flash Clock
I am trying to make simple flash clock.
Something like this: timevar=hours add " : " add minutes... etc.
I created myDate date object but I have no Idea how to display time in variable.
Flash 4 Clock - Possible?
Is it possible to make an analogue clock in Flash 4? I've seen lots of examples of Flash 5 clocks but none in version 4. If so, an example .fla would be very useful.
Flash Clock
I wanna make a clock on my site...
A simple clock that gets the time and date from the user's computer is easy, but here's the challenge:
I want it to get the time from somewhere on the internet, so it's always exactly right...complete with daylight saving changes and time zones!
Add A Clock In Flash...
How do i put a clock in a flash movie ?
Something like this:
Time 10h22m45s
Date 10-11-04
Best Regards
Flash Clock
Hi, ive got this flash clock, which tells local GMT time, im trying to modify it so that it tells the time for another timezone which is 5h 30m ahead.
i've tried this
hourrotate = (hours + 5) * 30;
and
minrotate = (mins + 30) * 6;
but the hourhand messes up for some reason.
here's the code, can someone please help me modify it.
_____________________
onClipEvent (enterFrame)
{
mydate = new Date();
GMToffset = mydate.getTimezoneOffset();
hours = mydate.getUTCHours();
mins = mydate.getUTCMinutes();
secs = mydate.getUTCSeconds();
months = mydate.getUTCMonth();
if (hours > 12)
{
hours = hours - 12;
} // end if
if (months < 2 || months > 9)
{
hourrotate = (hours - 1) * 30;
}
else
{
hourrotate = hours * 30;
} // end if
minrotate = mins * 6;
secrotate = secs * 6;
hourhand._rotation = hourrotate + mins / 2;
minhand._rotation = minrotate;
sechand._rotation = secrotate;
}
A Flash Clock
hey just a quick simple one here but im going tobe using this code a lot , so ive got 3 dynamic text fields and im just looking for an example that can populate those dynamic text fileds with 3 pieces of information
11:64 AM time
Sunday day
July 8, 2007 date
Thanks
Looking For Flash Clock
I am looking for the Flash clock that is being distributed in phpNuke distributions. To see the one I mean, please take a look at my site - www.ukmartin.com
The SWF file is being freely distributed, and being GPL licence, I assume it came from a "free" source. Unfortunately, the FLA file doesn't come with the distribution. The problem with it is that my clock is Black, and I'd prefer it to be red or blue.
Has anyone seen teh FLA file for this clock on their travels? If so I'd be grateful to hear from you.
Thanks
Martin
Flash Clock
Hi, ive got this flash clock, which tells local GMT time, im trying to modify it so that it tells the time for another timezone which is 5h 30m ahead.
i've tried this
hourrotate = (hours + 5) * 30;
and
minrotate = (mins + 30) * 6;
but the hourhand messes up for some reason.
here's the code, can someone please help me modify it.
PHP Code:
onClipEvent (enterFrame){ mydate = new Date(); GMToffset = mydate.getTimezoneOffset(); hours = mydate.getUTCHours(); mins = mydate.getUTCMinutes(); secs = mydate.getUTCSeconds(); months = mydate.getUTCMonth(); if (hours > 12) { hours = hours - 12; } // end if if (months < 2 || months > 9) { hourrotate = (hours - 1) * 30; } else { hourrotate = hours * 30; } // end if minrotate = mins * 6; secrotate = secs * 6; hourhand._rotation = hourrotate + mins / 2; minhand._rotation = minrotate; sechand._rotation = secrotate;}
Flash And PC Clock
Using: AS 3.0 - CS3
I'm looking either for help or a point in the right direction towards a tutorial on this.
My aim is to have a flash file that is reading the users clock and time, which would in turn show a certain object based on the time.
As an example: You have a collection of photos of a city from one perspective over the course of a day. With this you capture lighting and shadows over the day. If a user views the file at 10pm it would be night in the photo. If they were to view it at 12 noon it would be sunny and bright.
I've got the image and graphics part figured out and completed. As for the code to drive this and primarily code interacting or reading from the User's clock is something else altogether.
Any ideas?
Flash Clock...
I used this tutorial to create a simple flash clock.
The trouble is, as you will see in the flash clock example on the first page on the tutorial, the clock has a problem with the minutes, hours and seconds hands when it gets to the "58 minute" position.
For some reason, the Seconds hand always skips the 59th second, going straight from the 58th second position to the 0 second position.
And the same happens with the Minutes and Hours hands. When it gets to the 58th minute, the Minutes hands stays there for two minutes and then skips to the 0 minute position.
The clock uses this code:
---
onClipEvent (enterFrame) {
// Gets the time information and stores in MyDate
MyDate = new Date();
// Assigns values individually
hour = MyDate.getHours();
minute = MyDate.getMinutes();
second = MyDate.getSeconds();
// Calculates position for hours hand
if (hour> 11) {
hour = hour-12;
}
hour = hour*5;
movement = minute/12;
hour = int(hour+movement);
// Moves hours hand
with (_root.Clock.Hours) {
gotoAndStop(hour) + 1;
}
// Moves minutes hand
with (_root.Clock.Minutes) {
gotoAndStop(minute) + 1;
}
// Moves seconds hand
with (_root.Clock.Seconds) {
gotoAndStop(second) + 1;
}
}
---
At the end of each of the Hour, Minute and Second hand code, the "+ 1" code seems to do nothing at all... I've tried changing it to "+5" for the minutes, to test a it and it does nothing.
Is there any way to fix this and get this clock working properly?
Thanks.
Flash Second Hand - Clock
Does anyone know if there is a way to make flash pause for a seconmd and then increment the angle of rotation of a movieclip "second hand" by 6 degrees - this would simulate the second hand of a clock.
I have the script to make the second hade rotate but need to put in some feature that waits for a second before adding another 6 degrees to the rotation.
Frame 1
angle=0;
frame2
secondhand._rotation=angle;
frame3
angle =angle+6;
gotoAndPlay(2);
i need to put a pause in between frames 2 and 3 to get the one second delay. I have been trying with getTimer(), but am not to sure how to get the desired effect
Any help would be gratefully recieved
Countdown Clock In Flash?
Hi!
I need a .fla file that work as a countdown clock. Maybe a open source file or a tutorial ... someone?!
Flash Clock Problem - Please Help
Hi
I need to make a digital clock/watch for a flash presentation. I know there are lots of clock on flash kit but they all have seconds and minutes - I need just hours and minutes! - The clock also has to be 24 hour.
I've tried taking the code from a flash kit clock and tweaking it but it seems to screw up - for example 07.03 comes out as 7.3 - looks really naf like that!
If anyone can help me out with a source file or some code I would be most greatful!
Countdown Clock In Flash 5/MX
Hello everyone,
I was wondering how to write a ActionScript that counts down to a certain date. I have no problem writing the script only using hours, minutes, seconds... But lets say that the countdown should start on a 120 days until event x...How do I define Months, seeing that they do not all have the same amount of days in them? What would be the easiest way to go about this?
Thanks already for any answers,
Gene
Why Flash Clock Is 1hr Slow?
Im pretty sure it has nothing to do with the AS, so why would a clock in flash display 1hr slow? Someone has to already come across this minor aggrivation. Would it be just my puter settings?
Heres the script if youre curious:
Clock In Flash Problem
I have this actionscript on a movieclip that is a dynamic text. Everything works fine except when it gets to 12:00 A.M. it displays 0:00 A.M. instead, until it gets to 1:00 A.M. and everything is fine again. What is wrong with the code that makes it do this. I can't figure it out.
function getTime() {
var time = new Date();
var hour = time.getHours();
var minute = time.getMinutes();
var temp = ""+((hour>12) ? hour-12 : hour);
temp += ((minute<10) ? ":0" : ":")+minute;
temp += (hour>=12) ? " P.M." : " A.M.";
return temp;
}
var time;
time = getTime();
Thanks,
Kyle
Flash Based Clock?
Hi,
I'm pretty new to Flash... just started playing around with Flash MX. I haven't yet done anything with Actionscript, but I've been asked to help out on a project which I believe would require it.
So I wanted to ask you guys if the following is even possible with Flash. I need to make a clock with Flash. But instead of using a minute hand, it would display the current minutes with a gradually changing animation. For instance, a growing tree... at 5:00, it's a seed in the ground. At 5:30, a small tree. By 5:59, a fully grown tree.
I guess there wouldn't really be any animation per se, but rather 60 different frames. I would need to detect when a new minute within the current hour has begun, and jump to the next frame.
The main question in my mind is whether it is possible, using Actionscript perhaps, to determine the current time of day, and trigger the "jump" to the next frame at the correct moment. And even more importantly, whether I would be able to deal with events such as the user reloading the page, and such.
Thanks for your help!
-SA
P.S. - I've already implemented a similar thing using only HTML and JavaScript... at the end of every minute the page refreshes itself with an updated minute display.
Flash Digital Clock
I'm new to flash BTW [_flashDumb.iWould = say], I made a clock based on the tutorial by Adrian Wherry
http://www.flashkit.com/tutorials/Ac...-591/more1.php
(Thank you very much Adrian). And I want to make something different.
I just want to show one element of time, say...... seconds. I modified the dynamic text to show just 2 digits (:00):
// Script to get the time string from the newDate object
newDate = new Date();
mySecond = newDate.getSeconds();
// If the hour display is less than 2 digits, add an extra 0
if (length(mySecond)<2)
{
mySecond = "0" + mySecond;
}
// Space out the HH:MM:SS
displayTime = mySecond+ ":";
......the second frame in the tute has the same except an additional line of gotoFrame(1);
I tried modifying the AS took out the parts where.... hr, and min are called/used/coded..... whathaveyou..... And I'm left with what I think will do what I want. Low an behold, it ain't working.
I know there's more or less to that...... Any ideas?
P.S.: Also I wanted to make individual dynamic texts, say if I wanted to show the hr, and min in different colours or shades, sizes, etc. ......[copy+paste & replace the variable on the dynm. text?]
Flash Alarm Clock
Hi all,
Can someone tell me the best way to make an alarm clock? I need to be able to set the time limit on the alarm clock and when the specified time expires, a sound is played.
Does anyone know how to do this?
Thanks in advance,
Clock Scripting (Flash 5)
I have the clock all set up, the minute hand and second hand are working perfectly. Now I want to incorporate sounds when it reaches a certain time (Ex. A tick sound for every second, or a different chime on every quarter hour. 15 minutes will have 1/4 of the whole chime, 30 1/2 so on and so forth.) Can someone please help. Thanks
A Flash Clock Tutorial
I was looking and I still cant find any. I was wondering if there were any flash clock tutorials out there. I posted a link to an example of what I would like to try and make, its in the upper left corner of the webpage.
Example, Click Here
Making A Clock In Flash
Hi,
can somebody give me a pointer to how to make a movie clip, with a 24 hour digital clock, realtime, + 6 others running at the same time for different time zones. I've downloaded a good movie, but can't make it add hours to another clock, it starts displaying hours above 24 - I'm getting times like 39:44!
cheers
jonned@yahoo.com
Flash Countdown Clock
Hello All,
I'm in need of a Flash Countdown clock. Something that I can customize, change colors, and bg images etc. Would anyone be interested in creating a .fla file. I would give you back a link on the website that I will use it on. Send me a PM if you're interested. Website is a good pageview producing site in NYC.
-Thanks
Flash Clock Problem
Hello, for some reason the date is coming out on all computers as october!!! reads like this...
10/2/06, please help me figure this out. I am lost. Thanks!!!!!!
onClipEvent (load) {
days = new Array('Sunday','Monday','Tuesday','Wednesday','thu rsday','Friday','Saturday','Sunday');
months = new Array('January','February','march','April','May',' June','July','August','September','October','Novem ber','December');
timedate = new Date();
}
onClipEvent (enterFrame) {
hour = timedate.getHours();
minutes = timedate.getMinutes();
seconds = timedate.getSeconds();
todaydate = timedate.getDate();
day = timedate.getDay();
dayname = days[day];
month = timedate.getMonth();
monthname = months[month];
year = timedate.getFullYear();
if (Length(minutes)==1) {
minutes = "0" + minutes;
}
if (Length(seconds)==1) {
seconds = "0" + seconds;
}
currenttime = hour + ":" + minutes + ":" + seconds;
currentdate = todaydate + "/" + month + "/" + year;
fulldate = dayname + " " + todaydate + " " + monthname + " " + year;
delete timedate;
timedate = new Date();
}
[CS3] Flash Clock Not Working HELP
I was hoping someone could help me out with this. I'm doing the tutorial:
Analog Clock Tutorial
It's for a website I'm doing as a final. Time is short and I need to figure this out quick. I don't know if I've somehow messed up the action script or what's wrong!
Someone help!
Here's the .fla file, I got rid of the watch border it was too much space.
Thanks,
Vendian
Drew
Flash Alarm Clock....
Took 10 mins to put together....
Take it mess with it, do what you want with it....
I liked it and thought it may be of interest for some on here to fiddle with.
Enjoy and may it wake you up in the morning like it will me.....
Beta testing starts 7am tomorrow... lol
Get GMT Hours To Flash Clock
Hi there!
I've have same question just like ady020171, sorry!
but couldn't find out the solution
''Is it possible to make a Flash Clock that always displays GMT time no matter where the user is in the world. All the other flash clocks I've found (or can make) use the Users PC clock. I want a clock on my site to always show GMT (or London time) no matter where the user is in the world.
Ideally I want several clocks showing London, Paris, New York and local time which are accurate no matter what country you're in."
eventhoug I've tried to follow the Flash Help(F1)
but it didn't work (by using getUTCHours())
can anyone help!!!!
Thank you
P.
Advanced (?) Flash Clock
Hi peeps,
Hopeing someone might be able to help me...
Im trying to make a flash clock that also displays what time of day it is - i work in a college so i need to display what period it currently is.
i can get the clock to pull the time, date and day in.
i can get the 'time of day' to dynamically display depending on what time the clock says when i actually enter the time
cant get them to work together, can anyone help???!!
(you can see the attached file working if you delete the frame with a/s in the 'clock' mc)
many many thanks
Davey
p.s. the a/s is probably terrible!!!!
Digital Clock In Flash Using AS2.0
Hi folks,
Greetings for the day!! well my client wants a digital clocks to shown all at once. the details are as below:
There should be eight different clocks. Each clock should display time in different time zone. The time zones are for the cities – New York, London, Paris, Johannesburg, Moscow, Singapore, Sydney and Tokyo.
All the clocks should be displaying time simultaneously.
Please also keep in mind of the Day light saving.
i'm able to do this using by getting local time from my system and by changing the values by +hrs or -hrs depending on GMT time but my question is what iff the user changes the system time??? can any one give me a solution. my code looks as below:
onClipEvent (load) {
days = new Array('Sunday','Monday','Tuesday','Wednesday','thu rsday','Friday','Saturday','Sunday');
months = new Array('January','February','march','April','May',' June','July','August','September','October','Novem ber','December');
timedate = new Date();
}
onClipEvent (enterFrame) {
hour = timedate.getHours();
minutes = timedate.getMinutes();
seconds = timedate.getSeconds();
todaydate = timedate.getDate();
day = timedate.getDay();
dayname = days[day];
month = timedate.getMonth();
monthname = months[month];
year = timedate.getFullYear();
if (Length(minutes)==1) {
minutes = "0" + minutes;
}
if (Length(seconds)==1) {
seconds = "0" + seconds;
}
newdelhi = hour + ":" + minutes + ":" + seconds;
johannesberg =
delete timedate;
timedate = new Date();
}
which i've placed on a movie clip
hope a quick response.
thanks all
srini
AM/PM Switch In Flash Clock
Hi all,
I am designing 5 digital clocks with different timing of course through the below action script, and it is working great except Sydney and Tokyo, the problem is that it does not switch from PM to AM...it is only PM, below is the code of Sydney clock, and as for Tokyo I add +10.
Can you guys know what is wrong here ?
P.S : I place for New York : -3 for Cairo : +3 for London :+2, so do u think the reason for this issue of Sydney and Tokyo that the hour add is two digit ( above 10 )???
thanks in advance.
time=new Date(); // time object
var seconds = time.getUTCSeconds()
var minutes = time.getUTCMinutes()
var hours = time.getUTCHours()
hours = hours +11;
if (hours<12) {
ampm = "AM";
}
else{
ampm = "PM";
}
while(hours >12){
hours = hours - 12;
}
if(hours<10)
{
hours = "0" + hours;
}
if(minutes<10)
{
minutes = "0" + minutes;
}
if(seconds<10)
{
seconds = "0" + seconds;
}
clock_txt.text = hours + ":" + minutes + ":" + seconds +" "+ ampm;
Flash Clock Question ...
Hello everyone. I have a question about a script I found in the tutorials section ... it is for a clock. It pulls the time off of your computer and then displays it in dynamic text fields. Here is the thing ... I would like it to display a time for Florence, Italy ... which is exactly 9 hours AHEAD of my clock. How can I do this? I tried tinkering with the script ... putting + 9 where the variable "hours" was ... but all it did was make the time 23:44:02 ... bummer. Here is the script. Thanks so much for your help in advance.
Sincerely,
BRIAN
ActionScript Code:
onClipEvent (enterFrame) {
mydate = new Date();
seconds = mydate.getSeconds();
minutes = mydate.getMinutes();
hours = mydate.getHours();
day = mydate.getDay();
thisdate = mydate.getDate();
month = mydate.getMonth();
year = mydate.getFullYear();
if (day == 0) {
day = "Sunday";
} else if (day == 1) {
day = "Monday";
} else if (day == 2) {
day = "Tuesday";
} else if (day == 3) {
day = "Wednesday";
} else if (day == 4) {
day = "Thursday";
} else if (day == 5) {
day = "Friday";
} else if (day == 6) {
day = "Saturday";
}
if (month == 0) {
month = "January";
} else if (month == 1) {
month = "February";
} else if (month == 2) {
month = "March";
} else if (month == 3) {
month = "April";
} else if (month == 4) {
month = "May";
} else if (month == 5) {
month = "June";
} else if (month == 6) {
month = "July";
} else if (month == 7) {
month = "August";
} else if (month == 8) {
month = "September";
} else if (month == 9) {
month = "October";
} else if (month == 10) {
month = "November";
} else if (month == 11) {
month = "December";
}
if (minutes<10) {
minutes = "0"+minutes;
}
if (seconds<10) {
seconds = "0"+seconds;
}
if (hours>12) {
hours = hours-12;
ampm = "PM";
} else {
ampm = "AM";
}
if (hours == 0) {
hours = 12;
}
time = ((hours)+":"+(minutes)+":"+(seconds)+" "+(ampm));
datefinal = ((day)+", "+(month)+" "+(thisdate)+", "+(year));
}
Digital Clock In Flash 8
I have been trying to put a digital clock into my Flash 8 websites for I don't know how long. I have read dozens of tutorials, watched videos, and read books but no matter what Action Script I write, it doesn't work. The latest script returned "_level0.inst" when I tested the movie. The variable is named correctly and I followed the steps from a video tutorial where it worked perfectly for them. Do I have some setting that is messing it up? Here is the code:
Attach Code
onClipEvent (enterFrame) {
myTime = new Date ();
Seconds = myTime.getSeconds();
Minutes = myTime.getMinutes ();
Hours = myTime.getHours();
if (Hours>=12) {
ampm = "pm";
} else {
ampm = "am";
}
if (Hours>=13) {
Hours = Hours-12;
}
if (length(Minutes) == 1) {
Minutes = "0"+Minutes;
}
if(length(Seconds) == 1) {
nSeconds = "0"+nSeconds;
}
Clock = Hours+":"+Minutes+":"+Seconds+ " "+ampm;
}
Digital Clock In Flash 8
I have been trying to put a digital clock into my Flash 8 websites for I don't know how long. I have read dozens of tutorials, watched videos, and read books but no matter what Action Script I write, it doesn't work. The latest script returned "_level0.inst" when I tested the movie. The variable is named correctly and I followed the steps from a video tutorial where it worked perfectly for them. Do I have some setting that is messing it up? Here is the code:
Attach Code
onClipEvent (enterFrame) {
myTime = new Date ();
Seconds = myTime.getSeconds();
Minutes = myTime.getMinutes ();
Hours = myTime.getHours();
if (Hours>=12) {
ampm = "pm";
} else {
ampm = "am";
}
if (Hours>=13) {
Hours = Hours-12;
}
if (length(Minutes) == 1) {
Minutes = "0"+Minutes;
}
if(length(Seconds) == 1) {
nSeconds = "0"+nSeconds;
}
Clock = Hours+":"+Minutes+":"+Seconds+ " "+ampm;
}
Flash Clock Question
Can anyone help me with a query I have about how to get accurate clock time in Flash, rather than relying on the user's own local clock settings? Searching seems to indicate that "getUTCHours" and "getUTCMinutes" etc. will display GMT regardless, but it doesn't appear to be working for me. If I adjust my local clock settings, then the Flash clock adjusts accordingly...
Basically I've built this Flash clock. I test it out with my System clock accurate and the Flash clock displays the correct time. I put forward my System clock by 15 minutes and the Flash clock goes forward 15 minutes too when I next test it. I want to build a Flash clock that displays the correct time, regardless of whether the user has got the correct time on their machine or not...
Does this "getUTC" method still rely on the user's System clock, but then simply adjusts it according to the timezone they have set up?
Flash Count Down Clock Any One? Know
ne 1 know where i can find a tutorial about how to make a clock count down
like it would start at 60 seconds and count down to 0 ???
i seached all over and no 1 has tutorials .....
Flash Clock (hard One)
I'm trying to make a Flash Clock, using my own graphics though. I had a fla with one, but it got deleted when I had to reformat my hard drive...thanks for any assistance..
Reusing Clock, Flash 8
Last edited by graphter : 2005-12-08 at 05:12.
I've written this script to drive an analogue and digital clock...
ActionScript Code:
onClipEvent (load) {
Weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
}
onClipEvent (enterFrame) {
Time = new Date();
Day = Weekdays[Time.getUTCDay()]
Mil = Time.getUTCMilliseconds();
S = Time.getUTCSeconds();
M = Time.getUTCMinutes();
H = Time.getUTCHours();
SecondHand._rotation = S*6+(Mil/(1000/6));
MinuteHand._rotation = M*6+(S/10);
HourHand._rotation = H*30+(M/2);
if (length(H) == 1) {
H = "0"+H;
}
if (length(M) == 1) {
M = "0"+M;
}
if (length(S) == 1) {
S = "0"+S;
}
DisplayTime = H+":"+M+":"+S;
DisplayDay = Day
}
The clocks work fine, but I have 2 issues...
My first problem is that the day of the week is returning: undefined, but I can't see my error. Can anyone see it?
My second problem is that I want to use this code on the main timeline, and then pull the neccessary information into 12 different clock movieclips on the timeline, offsetting each differently against UTC for world times. I don't know how to do this. Can you show me how?
Thanks
Setting Alarm Clock In Flash
hi! all
i am working on a clock project and am trying to make
a clock with alarm for reminder.......though it works fine when the alarm is set and while the swf is open
but wht im having problem is that when i set the clock and close the file in browser and re open it the alarm does not functtion......though i know tht it needs some backend adn server side scripting to be done.......but i don't know such thing.....
can any one tell me how to do it...........
any source / link will be helpful
thanx
sameer
Flash Clock At Server Side
Hi All,
I have put the Flash Clock on my server. my intention was to show the WORLD TIME ZONE after clicking on different regions.
But i found that when the swf is shown in the browser, it takes the time of CLIENT not of the SERVER.
Because of this i am not able to generate the world clock.
Is anybody there who can help me ?
Saiprasad
Clock In Flash Mx (changing Variables)
I have a three dynamic text boxes to display a time across the screen like on the tv guide channel. the one on the left will display the real time. the next one to the right will display the next increment, then the next one to the right will display the next increment, etc. for example if the time is 9:15 PM the next to the right would show 9:00, then 9:30, then 10:00 across the screen. I have the code for the real time movie clip:
function getTime() {
var time = new Date();
var hour = time.getHours();
var minute = time.getMinutes();
var temp = ""+((hour>12) ? hour-12 : hour);
temp += ((minute<10) ? ":0" : ":")+minute;
temp += (hour>=12) ? " P.M." : " A.M.";
return temp;
}
this is called up on the main timeline. I need the code for the next three across. so it would be for the first one to the right; if minutes<20 then minutes will display :00, if they are >20 then the minutes will display :30, if they are >40, then the minutes would display :00 again but for the next hour up. I have been trying many different things but I can't get it to work. I just need to know how to check the real minute and hour variables and use if else statements... I think?
help,
kyle
Flash Clock And Daylight Saving
I am in Aus, I have a clock on a site. The time on the site shows 1 hour less than the time on the computer, so if it is 10.30 am on the computer it is 9.30 am on the site.
If I untick the 'automatically adjust clock for daylight saving changes' box, in the windows date and time control box, and apply the changes, then the site will read the same time as the computer. This is bugging the life outa me.
Does anyone have a way to fix this.
cheers
mr mooch
CUSTOM FLASH CLOCK (hard One)
I'm trying to make a Flash Clock, using my own graphics though. I had a fla with one, but it got deleted when I had to reformat my hard drive...thanks for any assistance..
|