# Help ENTER\_FRAME as3

**URL:** <https://forum.kirupa.com/t/help-enter-frame-as3/312896>\
**Category:** flash\
**Created:** [August 15, 2010, 12:24pm UTC](https://forum.kirupa.com/t/help-enter-frame-as3/312896 "2010-08-15T12:24:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![duchman](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@duchman](https://forum.kirupa.com/u/duchman)\
**Post date:** [August 15, 2010, 12:24pm UTC](https://forum.kirupa.com/t/help-enter-frame-as3/312896/1 "2010-08-15T12:24:50Z")

</div>

Hello,

I have this code in frame 1:

```auto
gl.addEventListener(Event.ENTER_FRAME, vrata);

 function vrata(e:Event):void{ 
   var br = (Math.round(Math.random() * 1)) ;
   TweenMax.to(gl, 1.5, {colorMatrixFilter:{brightness:br}});
 };  

```

some filter animation for my nav.button, and it works ok.  
Then I added a Mc on frame 2 that should be called from that nav.button from frame 1, and it all got messy…  
So, how do I loop filters or stop the play head on frame 1 until my nav kick stuff to gotoAndPlay(2); ?  
Thnx.
