Simple inventory system gone wrong

This is my code in the main timeline.

[FONT=monospace]
[/FONT]//with declarations 
var itemSlot:Array = new Array ([ menuBox.slot1, menuBox.slot2, menuBox.slot3, menuBox.slot4, menuBox.slot5, menuBox.slot6, menuBox.slot7, menuBox.slot8, menuBox.slot9, menuBox.slot10, menuBox.slot11, menuBox.slot12, menuBox.slot13, menuBox.slot14, menuBox.slot15, menuBox.slot16, menuBox.slot17, menuBox.slot18, menuBox.slot19, menuBox.slot20, menuBox.slot21, menuBox.slot22, menuBox.slot23, menuBox.slot24, menuBox.slot25, menuBox.slot26, menuBox.slot27, menuBox.slot28, menuBox.slot29, menuBox.slot30, menuBox.slot31, menuBox.slot32, menuBox.slot33, menuBox.slot34, menuBox.slot35, menuBox.slot36, menuBox.slot37, menuBox.slot38, menuBox.slot39, menuBox.slot40]);    
//in the function main  
if (item.hitTestObject(player)) {     
for (var i:int = 0; i <=itemSlot.length; i++) {       
removeChild(item);       
itemSlot*.addChild(item);       
item.x=itemSlot*.x; 
      item.y=itemSlot*.y;     
} 
}

my thought processes was that i would need to do it this way because the slots1-40 are nested inside my menuBox movieClip. (on frame 5, if it matters).

If you want to physically see my project (this is for school) you can go to my personal “dropbox” provided by the school.

NOTE : I dont know if this would be considered against the rules, by providing the link to the swf. But, if it is please tell me so i can remove the link.

ict.neit.edu/000946266/New Project/

First click on the swf, so the controls work.

Controls:
W A S D = movement
Enter = Menus Open
Arrow Keys Up/Down = Cycle Through Menu
ESC = Closes menus out.

If you notice that when you open different menus up it is just that, different menus. So the slots will be located in the items menu.

Also, i removed the above code so that you guys can get a visual of what i am trying to achieve.