# Problem, with enterframe/function

**URL:** <https://forum.kirupa.com/t/problem-with-enterframe-function/194680>\
**Category:** Uncategorized\
**Created:** [July 25, 2006, 2:50pm UTC](https://forum.kirupa.com/t/problem-with-enterframe-function/194680 "2006-07-25T14:50:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yodalr](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yodalr/32/1816_2.png) [@yodalr](https://forum.kirupa.com/u/yodalr)\
**Post date:** [July 25, 2006, 2:50pm UTC](https://forum.kirupa.com/t/problem-with-enterframe-function/194680/1 "2006-07-25T14:50:53Z")

</div>

How, to make flash redo(loop) theese actions by not using gotoandplay ?

```
ActionScript Code:
[FONT=Courier New][LEFT]n = n-[COLOR=#000080]1[/COLOR];

```

[COLOR=#000000] **var** [/COLOR] k:[COLOR=#0000FF]Number[/COLOR] = [COLOR=#000080]0[/COLOR];  
must.[COLOR=#0000FF]onEnterFrame[/COLOR] = [COLOR=#000000] **function** [/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
target\_shell = [COLOR=#0000FF]eval[/COLOR]COLOR=#000000[/COLOR];  
target\_shell.[COLOR=#0000FF]\_alpha[/COLOR] -= [COLOR=#000080]5[/COLOR];  
[COLOR=#0000FF]if[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]

```
    target_shell.[COLOR=#0000FF]_visible[/COLOR] = [COLOR=#000000] **false** [/COLOR];
    
    n = n-[COLOR=#000080]1[/COLOR];
    k = k+[COLOR=#000080]1[/COLOR]
[COLOR=#000000]}[/COLOR]
[COLOR=#0000FF]if[/COLOR] [COLOR=#000000]([/COLOR]n&lt;=[COLOR=#000080]0[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]

[COLOR=#0000FF]gotoAndPlay[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000080]3[/COLOR][COLOR=#000000])[/COLOR];

    
[COLOR=#000000]}[/COLOR]

```

[COLOR=#000000]}[/COLOR];  
[/LEFT]  
[/FONT]
