To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-08-2006, 12:24 PM   #1
bailyesboy
Member
 
Join Date: Jan 2006
Posts: 44
24 Hour Clock

It is possible to get a 24 hour clock in Koolmoves. This is the format of it at 1AM:

1:29:59
1:30:00
1:30:01

and at 1PM

13:29:59
13:30:00
13:30:01

Thanks
bailyesboy is offline   Reply With Quote
Old 11-08-2006, 05:52 PM   #2
Stoke Laurie
That web bloke
 
Stoke Laurie's Avatar
 
Join Date: Jan 2006
Location: England
Posts: 869
your clock

There you go, an example of a digital 24 hour clock and an anologue one thrown in for free! all in 8 lines of code.
Change font for appearance, and delete anything you don't need.
Cheers

Last edited by Stoke Laurie; 12-21-2007 at 08:09 PM.
Stoke Laurie is offline   Reply With Quote
Old 11-08-2006, 06:43 PM   #3
tmoore935
Relaxing
 
tmoore935's Avatar
 
Join Date: Oct 2001
Location: colorado, usa
Posts: 1,712
Here is a version that I did that tells what time/direction that the goverenment is using.

http://www.diversioncentral.com/games/samclock.html
__________________
Any programming language is at its best before it is implemented and used.
tmoore935 is offline   Reply With Quote
Old 11-09-2006, 05:30 AM   #4
Stoke Laurie
That web bloke
 
Stoke Laurie's Avatar
 
Join Date: Jan 2006
Location: England
Posts: 869
xlent
Stoke Laurie is offline   Reply With Quote
Old 11-09-2006, 07:57 AM   #5
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
Stoke send that to the Exchange as well if you would please.
blanius is offline   Reply With Quote
Old 11-09-2006, 11:09 AM   #6
Stoke Laurie
That web bloke
 
Stoke Laurie's Avatar
 
Join Date: Jan 2006
Location: England
Posts: 869
ok will do Brett
Stoke Laurie is offline   Reply With Quote
Old 11-09-2006, 11:54 AM   #7
bailyesboy
Member
 
Join Date: Jan 2006
Posts: 44
Thanks. Awesome clock. Now a new challenge for you
I got rid of the hands and the clock but kept the digital clock. How will I be able to make a script where at exactly 17:20 an image will come up and then at exactly 17:30 another image will come up. Any ideas?
bailyesboy is offline   Reply With Quote
Old 11-09-2006, 11:55 AM   #8
bailyesboy
Member
 
Join Date: Jan 2006
Posts: 44
Not an image, a movie clip sorry
bailyesboy is offline   Reply With Quote
Old 11-09-2006, 12:13 PM   #9
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,911
set a function and using set interval to have it run all the time, use it to check with an if statement and when the hour variable and the minute variable are what you want show your movie clip by moving it from off stage by simply setting the _x and _y to somewhere on stage.

REFERENCES:
See Manual for structure of IF statements and How to write a function.

setInterval information:

setInterval(functionReference:Function, interval:Number, [param1:Object, param2, ..., paramN]) : Number
see http://livedocs.macromedia.com/flash...D00001766.html

Last edited by blanius; 11-09-2006 at 12:18 PM.
blanius is offline   Reply With Quote
Old 11-09-2006, 07:46 PM   #10
Stoke Laurie
That web bloke
 
Stoke Laurie's Avatar
 
Join Date: Jan 2006
Location: England
Posts: 869
If you set up like this
myTime = new Date();
var seconds = myTime.getSeconds();
var minutes = myTime.getMinutes();
var hours = myTime.getHours();


you then have the 3 variables that you need

If you then include
mc1.loadMovie(hours+".jpg" );
your project will load 1 of 24 pre-named images into your mc1 dependant opon the hour.
You could extend it to
mc1.loadMovie(hours+"_"+minutes+".jpg" );
and label your images 7_20.jpg etc

However,
in the first example where we only use hours, you need only 24 images, for the second example you would need one for each minute, which would be clearly impractical.
Stoke Laurie is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:12 AM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.