# onEnterFrame cpu

**URL:** https://forum.kirupa.com/t/onenterframe-cpu/164534
**Category:** flash
**Created:** [October 2, 2005, 2:19pm UTC](https://forum.kirupa.com/t/onenterframe-cpu/164534 "2005-10-02T14:19:27Z")
**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 2, 2005, 2:19pm UTC](https://forum.kirupa.com/t/onenterframe-cpu/164534/1 "2005-10-02T14:19:27Z")

</div>

My swf works nice, only my it keeps increasing cpu.  
Can anyone tell me how I can stop that?  
I thinks its because of the onEnterFrame, but if I change that to onLoad or something, it dont work anymore.  
blow is my code.

```auto
input_var._visible = false;
Stage.scaleMode = "noScale";
fscommand("showmenu", "false");
loadVariables("random.php", this);
onEnterFrame = function () {
    aantalLetters = input_var.length;
    for (i=0; i<aantalLetters; i++) {
        iets = random(8);
        beweegletter.duplicateMovieClip("beweegletter"+i, this.getNextHighestDepth(), {_x:i*25, _y:iets});
        _root["beweegletter"+i].tekst.text = input_var.charAt(0+i);
    }
};

```
