# Again onEnterFrame :(

**URL:** <https://forum.kirupa.com/t/again-onenterframe/165179>\
**Category:** Uncategorized\
**Created:** [October 8, 2005, 5:13pm UTC](https://forum.kirupa.com/t/again-onenterframe/165179 "2005-10-08T17:13:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vintage](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vintage](https://forum.kirupa.com/u/vintage)\
**Post date:** [October 8, 2005, 5:13pm UTC](https://forum.kirupa.com/t/again-onenterframe/165179/1 "2005-10-08T17:13:44Z")

</div>

I want to play sound only one time, and not on each enterFrame, anyone ?

```auto

this.onEnterFrame = function() {
    //check voor nieuwe post
    var check1 = _root.nieuw.text;
    var check2 = _root.oud.text;
    //tijd zooi
    var time = getTimer()-startTime;
    var milliseconds = lengte-time;
    var seconds = Math.floor(milliseconds/1000);
    var minutes = Math.floor(seconds/60);
    seconds %= 60;
    minutes %= 60;
    if (seconds<10) {
        seconds = "0"+seconds;
    }
    if (minutes<10) {
        minutes = "0"+minutes;
    }
    alles = minutes+seconds;
    if (alles == 0) {
        _root.play();
    }
    //check nieuwe psot
    if (check1 != check2) {
        sound.play(); //<-that needs to play only one time.  
    }
    timer.text = "refresh @ "+minutes+":"+seconds;
};

```
