# Script help

**URL:** <https://forum.kirupa.com/t/script-help/158904>\
**Category:** Uncategorized\
**Created:** [August 12, 2005, 5:25pm UTC](https://forum.kirupa.com/t/script-help/158904 "2005-08-12T17:25:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lord\_Rahl](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@Lord\_Rahl](https://forum.kirupa.com/u/Lord_Rahl)\
**Post date:** [August 12, 2005, 5:25pm UTC](https://forum.kirupa.com/t/script-help/158904/1 "2005-08-12T17:25:07Z")

</div>

Okay, some time ago someone made a little inventory fla. to help me out. But now I am looking at it and can’t figure one thing out. First here is the script with the section I can’t get.

```auto

Inventory = new Array();
InventoryQuantity=new Array()
for (i=0; i<8; i++) {
  **var Text = _root["Item"+(i+1)];**
  if (InventoryQuantity* == 1) {
   **Text.text = Inventory*;
** } else {
**Text.text = Inventory*+" x"+InventoryQuantity***
  }
  if (Inventory* == undefined) {
   Text.text = "None";
  }
 }

```

The bold section is the part I need help with. Mainly the last two, which are basicly saying \*_“Item”+(i+1).text = Inventory_ \*\*, etc. This works and all, with 8 text fields named Item1-8. But what if they where in a MC. Isn’t that bold section where you would add the MC name with a “.” after it like so. \*_MC.Text.text = Inventory_; \*\*. But its not. I don’t know. I have been thinking to hard lately and just need some help getting this script to work in a MC. Brains gonna fry from to much work.
