# Remember previous keyframes?

**URL:** <https://forum.kirupa.com/t/remember-previous-keyframes/325525>\
**Category:** flash\
**Created:** [October 20, 2011, 2:14pm UTC](https://forum.kirupa.com/t/remember-previous-keyframes/325525 "2011-10-20T14:14:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![speed\_e](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@speed\_e](https://forum.kirupa.com/u/speed_e)\
**Post date:** [October 20, 2011, 2:14pm UTC](https://forum.kirupa.com/t/remember-previous-keyframes/325525/1 "2011-10-20T14:14:18Z")

</div>

Hi,  
I am just trying to create a simple escape the room game. I have a main frame with all the objects and another layer with different views. What I want to accomplish is, e.g.

If a panel with buttons is clicked you go to the next frame, which shows a zoomed in panel with buttons. Then you enter a code and if it is correct you go back to the main frame. As the code was correct a drawer, which was previously closed opens and a new item is added to your inventory.

This is my code for the room with the drawer:

```auto

drawer3_mc.enabled = false;
drawer3_mc.addEventListener (MouseEvent.CLICK, foundObjectScrewd);

function foundObjectScrewd(event:MouseEvent):void{
if (drawer3_mc.enabled == true) {
    screwd_btn.visible = true;
    blue1_mc.visible = false;    
    text1.text = " You have found a screwdriver!";
}
else
{    
    text1.text = " The drawer won't open...";
}
}

```

This is my code for the actual zoomed panel:

```auto

stop();

go.addEventListener(MouseEvent.CLICK,checkpassword);
go.buttonMode = true;

function checkpassword(event:MouseEvent){
    userinput = code.text;
    if (userinput == thepassword) {
        gotoAndStop("main");
        text1.text = "You hear a click somewhere in the room.";
        drawer3_mc.enabled = true;
    }else {
        instruction.text = "You input the wrong password!";
    }
}

```

After I input the correct password in the panel I move back to the main room, but I keep get the message " The drawer won’t open… ". How can I get Flash to remember that the password has been right?
