# Item slot help

**URL:** <https://forum.kirupa.com/t/item-slot-help/226053>\
**Category:** Uncategorized\
**Created:** [May 17, 2007, 8:48pm UTC](https://forum.kirupa.com/t/item-slot-help/226053 "2007-05-17T20:48:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dragonknight](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@Dragonknight](https://forum.kirupa.com/u/Dragonknight)\
**Post date:** [May 17, 2007, 8:48pm UTC](https://forum.kirupa.com/t/item-slot-help/226053/1 "2007-05-17T20:48:39Z")

</div>

```auto
function additem(obj) {
    _root.obj.found = true;
    _root.hud.eval("slot"+_root.slotnum).gotoAndPlay(obj);
    _root.slotnum++;
}

```

thats what i have on first frame of my game

and its called when i click on an item

the item’s coding would look like this

```auto

on (press) {
    _root.additem("ring")
}

```

theres a movie clip with an instance name “hud” with other movieclips inside it (“slot1” “slot2” etc… etc…)

the slots have labels in it that will determine what items there are  
so for “ring” there will be a button with an icon of a ring in it at that label with a stop() command

but it won’t work for me
