# Proof-of-Concept Programming

**URL:** <https://forum.kirupa.com/t/proof-of-concept-programming/301492>\
**Category:** flash\
**Created:** [December 10, 2009, 1:28am UTC](https://forum.kirupa.com/t/proof-of-concept-programming/301492 "2009-12-10T01:28:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manpumpkin](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@manpumpkin](https://forum.kirupa.com/u/manpumpkin)\
**Post date:** [December 10, 2009, 1:28am UTC](https://forum.kirupa.com/t/proof-of-concept-programming/301492/1 "2009-12-10T01:28:59Z")

</div>

Alright so I’m working on a proof-of-concept escape game and I need a little help with the programming. I’m new to AS3, so keep your replies simple so I can understand them =P

First of all, when switching scenes by clicking btn\_larrow, I am using:

```auto
stop();

btn_larrow.addEventListener(MouseEvent.CLICK, larrowClick);

function larrowClick(event:MouseEvent):void{
    gotoAndStop("room4");
}

```

It’s giving me a compiler error of: 1120: Access of undefined property btn\_door. Is there a way to fix this, and/or a better way to accomplish switching scenes?

When a player first clicks on an item, I want it to appear in their inventory, which is a little panel at the bottom of the screen. Ideally, the player can pick up any item, in any order. The only way I thought I could accomplish was by placing the item on screen at a visible location, and then having an instance of that item off screen. Then:

```auto
stop();

btn_key.addEventListener(MouseEvent.CLICK, keyClick);

var player_has_key:Boolean = false

function keyClick(event:MouseEvent):void{
    var player_has_key:Boolean = true
    if(player_has_key == true){
        btn_key.x = 250
        btn_key.y = 250
        btn_key1.x = 0
        btn_key1.y = 0
}

```

btn\_key is the off screen instance of the item, and btn\_key1 is the on screen, visible instance. As stated before, if there is a better way to do this, please let me know!

Thanks,  
j. phil.
