# Playing Up Inventory System

**URL:** <https://forum.kirupa.com/t/playing-up-inventory-system/279725>\
**Category:** flash\
**Created:** [January 18, 2009, 1:54pm UTC](https://forum.kirupa.com/t/playing-up-inventory-system/279725 "2009-01-18T13:54:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spanjj](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Spanjj](https://forum.kirupa.com/u/Spanjj)\
**Post date:** [January 18, 2009, 1:54pm UTC](https://forum.kirupa.com/t/playing-up-inventory-system/279725/1 "2009-01-18T13:54:38Z")

</div>

I have designed a basic inventory system for a point and click game I’m working on. Its pretty straight forward atm, see below:

```auto

package {
    import flash.display.MovieClip;
  import flash.display.Sprite;
  import flash.events.*;
    
  public class InventoryAccess extends MovieClip {
     private var _inventoryI = new Interface();
   private var _itemsInDisplay:Array;
   private var _fishPaste = new FishPasteInv();
  
   public function InventoryAccess() {
    _itemsInDisplay = new Array();
    addChild(_inventoryI);
   }
  
   public function updater(MC:String) {
    switch(MC) {
    case "fish paste" :
    _itemsInDisplay.push(_fishPaste);
    updating(_itemsInDisplay);
    break;
    }
   }
  
private function updating(arrayOfItems:Array) {
  for (var i:int=0;i<arrayOfItems.length;i++) {
   addChild(arrayOfItems*);
  }
 }
}
}

```

‘updater’ is a function that can be accessed from outside the AS file, i.e. when object is picked up file.updater… through tracing i have found out that all the functions are being executed but the object just isn’t being added to the screen :S Any help would be greatly appreciated, thanks.
