# Telling Time, Making Noise \[FMX\]

**URL:** https://forum.kirupa.com/t/telling-time-making-noise-fmx/55392
**Category:** flash
**Created:** [June 23, 2004, 3:27pm UTC](https://forum.kirupa.com/t/telling-time-making-noise-fmx/55392 "2004-06-23T15:27:16Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![as\_clark20](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@as\_clark20](https://forum.kirupa.com/u/as_clark20)
#### Post date: [June 23, 2004, 3:27pm UTC](https://forum.kirupa.com/t/telling-time-making-noise-fmx/55392/1 "2004-06-23T15:27:16Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 9, 2004, 10:56am UTC](https://forum.kirupa.com/t/telling-time-making-noise-fmx/55392/2 "2004-07-09T10:56:56Z")

</div>

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](http://www.dataworks.org.uk/adamsChimeClock.fla)

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

Adam.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 17, 2004, 6:07pm UTC](https://forum.kirupa.com/t/telling-time-making-noise-fmx/55392/3 "2004-07-17T18:07:24Z")

</div>

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.

```auto
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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 19, 2004, 8:27am UTC](https://forum.kirupa.com/t/telling-time-making-noise-fmx/55392/4 "2004-07-19T08:27:34Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 19, 2004, 6:17pm UTC](https://forum.kirupa.com/t/telling-time-making-noise-fmx/55392/5 "2004-07-19T18:17:26Z")

</div>

scrap the above code and replace it with this:

```auto
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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 20, 2004, 8:52am UTC](https://forum.kirupa.com/t/telling-time-making-noise-fmx/55392/6 "2004-07-20T08:52:32Z")

</div>

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!!
