I'm trying to create an inventory system based on the ones you see in games like final fantasy etc. Just a list where you can see everything you have acquired so far.

So i had the idea to make it easier I would just have 30 duplicates of a movieclip acting as the bag slots. each frame of the bag slot movieclip has an item listed on it (with frame 1 being the empty slot) and depending on where the item lays in the inventory array, that's what slot it goes to in the bag e.g:

Code:
//My inventory array on the main stage
var MYinv:Array = ["Sword","Potion","RubberChicken"];
Code:
//My script for arranging each slot on the bag
for(var i:int=0;i<MovieClip(root).MYinv.length;i++){
	s0.gotoAndStop(MovieClip(root).MYinv[i]);
	s2.gotoAndStop(MovieClip(root).MYinv[0]);
}
s0-s29 are all my bag slot movieclips so it would loop through each one and make it go to the frame label listed in the same position as the array.

Each frame of the empty slot movieclips would be labeled like this
1 = Sword
2 = Potion
3 = RubberChicken

The second line you see is just me forcing s2 to change to MYinv[0] which works fine but when i try and use the var
[i]
nothing happens. I think it's because of the way im writing the
MYinv[i]
part.

is there a special way to do this?

I was considering adding a movie clip to the slots instead of having every item on each frame which would mean I could have far more Items stored in the library and then just pull them out when needed but that didn't work either, the code was something like:

Code:
s0.addChild(MovieClip(root).MYinv[i]);
but it threw up errors stating that the array was a string and I'm not sure how to have an array of movieclip names which you can use to addChild from the library. Plus the fact that when I wanted to rearrange the inventory I'd have to somehow remove the child from each slot (removing dynamically added children has always been a headache for me) then reattach them in order, it just seemed too much of a headache.

I know the way I'm doing it is a bit noobish so should i do it the frame way? or should i try and attach items from the library? if so how do you have links to library items in an array?

Thanks in advanced!