ActionScript 3.0 inventory?

I’ve been having trouble finding a tutorial online for a AS3 tutorial on making an in-game inventory for an overhead rpg game, the items go into your inventory after your character walks over them. I’ve only found ActionScript 2.0 tutorials. But this is what I’ve got. I have 3 inventory slots listed as slot1, slot2 and slot3. I’ve only been writing actionscript for 1 week. So I’m not really sure if I’m going in the right or wrong direction here. I’m also having trouble typecasting to add the number j to slot to select a slot for the item to go, and thank you to all who reply.

private function Inventory(e:Event):void
{
var itemsOnStage:Array = [_level1._itemtest,_level1._itemtest2];
var itemsInInventory:Array = [];
var inventorySlots:Array = [slot1,slot2,slot3];

		var j = 1; j <=3; j++;
		
		var nextOpenSlot = j;

		_level1._itemtest.buttonMode = true;

		if (_level1._itemtest.hitTestPoint(_knight.x, _knight.y, true))
		{
			itemsInInventory.push(_level1._itemtest)
			_level1._itemtest.x = String("slot" + Number(nextOpenSlot));
			trace("sdf");
		}
	}