# Timer triggers Event

**URL:** <https://forum.kirupa.com/t/timer-triggers-event/224460>\
**Category:** flash\
**Created:** [May 2, 2007, 3:52pm UTC](https://forum.kirupa.com/t/timer-triggers-event/224460 "2007-05-02T15:52:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ponyack](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@ponyack](https://forum.kirupa.com/u/ponyack)\
**Post date:** [May 2, 2007, 3:52pm UTC](https://forum.kirupa.com/t/timer-triggers-event/224460/1 "2007-05-02T15:52:00Z")

</div>

Yes, I have posted this topic but its really urgent that I find a solution.

When the countdown timer reaches :30 i need a warning to display and/or sound.

ADDthis line of code:

> if (outputSec == 30) { warning.text=“Warning” }

the code is below

```auto
function countDown() {
    if (Math.round(outputMin)==0 && Math.round(outputSec)==0 || chk==1){
        clearInterval(timer);
    }else {
        if (outputSec != "00") {
            outputSec = Math.round(outputSec) - 1;
            //trace(output);
        }else {
            outputSec = 59;
            outputMin = Math.round(outputMin) -1;
        }
        if (outputSec <= 9 && outputSec > 0) {
            outputSec ="0" + outputSec;
    
        }else if (outputSec == 0) {
            outputSec = "00";
        }
    }
}

chk=0;
stop();

```
