# Enter Frame

**URL:** <https://forum.kirupa.com/t/enter-frame/201001>\
**Category:** Uncategorized\
**Created:** [September 17, 2006, 4:49pm UTC](https://forum.kirupa.com/t/enter-frame/201001 "2006-09-17T16:49:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kanu](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kanu/32/2508_2.png) [@kanu](https://forum.kirupa.com/u/kanu)\
**Post date:** [September 17, 2006, 4:49pm UTC](https://forum.kirupa.com/t/enter-frame/201001/1 "2006-09-17T16:49:59Z")

</div>

There are two frames in my file  
i initialize some var on 1st frame i.e.

_ **var flag:Number=false** _

_**player\_mc.onEnterFrame=function(){**_  
\*\*\* if(this.hitTest(stone\_mc)){\*\*\*  
\*\*\* flag=true\*\*\*  
\*\*\* }\*\*\*  
\*\*\* }\*\*\*

* * *

this is perfectly fien if i work only in one frame

but when i **came**  **back from 2nd frame to 1st frame**  
**automaticallly becomes flag=false**  
**but i want flag=true**

I really need a solution for this.
