# Telling Time, Making Noise [FMX]

Hi all,

I was thinking the other week - wouldn’t it be great to have a flash clock that not only tells a classy analogue time but also, like a church clock, gives out bell noises when the hour is reached, an also chimes the number of hours the time corresponds too.

So at 1pm/am it will chime once, and at midnight you get 12 chimes and so on, I’m sure you get my meaning. I’m not great when it comes to working with sound, infact I’ve never added much more than a custom click noise on a button. Anyone have an ideas how to go about this? I’ve attached a nice church bell noise for y’all just incase.

Thanks.

Ads.

Hi all,

my chime clock is now available for download at the low low price of zero pounds! It will chime so many times corresponding to the time! Hooray!

Here’s where to download:
Dataworks Solution >> adamsChimeClock.fla

Hope its useful. PS: I’m working on an alarm clock too so that will be available soon.

Adam.

nice to be mentioned in your clock there:m: that was just rude to have my code copied and pasted and then ignored!

but because im such a nice guy (or stupid guy) i thought id optimise your code even further.

``````if (hour > 12){
chimes = hour-12
}
else{
chimes = hour
}
if (min == 0 && sec == 0){
chime.start(0,chimes)
}
``````

rather than the 35 lines that you have.

Prophet.

Prophet, great code but there’s only one problem with it. Set your system time to 23:59:59 and listen. The chimes, instead of playing 12 times at midnight will only play once! Any way I can correct for this?

scrap the above code and replace it with this:

``````if (hour == 0){
chimes = hour+12
}
else{
chimes = hour
}
if (min == 0 && sec == 0){
chime.start(0,chimes)
}
``````

we dont need to take the 12 off of the var hour coz we do that earlier… however when it is midnight, the clock doesnt display 12 or 24 but 0… hence why we add 12 instead…

Prophet.

You’re not going to believe this prophet but if you set your system clock to, say, 14:55:58 then your clock will recognise it is 15:00 hours and chime 15 times! Yaaa!!